netlogo - How can I simulate a moving patch? -
i'm trying make frogger-like game patches move around , turtle can move onto safe patch. if have few patches red, how can 'move' them around if turtles? have this, seems move more 1 patch @ time , result, red patches destroyed if there more 1 red:
if pcolor = red [ ask patch-at 0 1 [ set pcolor red] set pcolor black ]
you ask neighbor patch (left or right) painted red , actual patch painted black or whatever default color is.
for you'll want actual patch coordinates. using patch-at
asks patch @ 0,1
relative whole world.
Comments
Post a Comment