tags:

views:

9

answers:

1

am trying to apply the following condition:

if ( the color of patch -2 -1 is red ) [ some cammands ]

can anyone please tell me how to write this in netlogo

A: 

If you mean the patch at coordinates (-2 1) then its:

ask (patch -2 1) with [pcolor = red] [commands]

or

ask (patch -2 1) [ if (pcolor = red) [commands]]
Jose M Vidal