Christian Alvin Buhat
Christian Alvin Buhat

Reputation: 37

Positioning of turtles

Fishes and planktons

Hello! This is a 20x20 worls. Currently my program randomizes these planktons (green grass) and these fishes (orange fish). What I would like to do is to place all the planktons in just a certain portion of the world, say the lower left part, what should be my setxy?

Upvotes: 0

Views: 54

Answers (1)

ccjo
ccjo

Reputation: 101

I would suggest that you'd do something like:

move-to one-of patches with [pxcor < x and pycor < y]

And you do your geometry in that expression.

You can do similar with

setxy (random x) (random y) 

and you make your own bounds.

Hope this helps.

Upvotes: 4

Related Questions