0

I want to make 2 turtles(a male and a female) get married. I have 2 different shapes for males and females in my simulation.

If a female meets a male on the same patch, they get married. When they do, I want to bundle them as one unit (i.e. I want to delete one of the turtles, and change the other to a third shape indicating a married couple).

How can I do this. I am already lost at the "meeting" stage.

What I have:

if any? other turtle-here with [?????]

Pseudocode: if female on_same_patch_as_male:

change her marital-status to married

Remove [one of the two turtles]

change the shape of the remaining turtle to "married-couple-icon"

Any help is appreciated

Am95
  • 59
  • 6
  • I imagine you are using breeds? – Matteo Dec 06 '22 at 14:27
  • `set shape "..."` should do the trick – LeirsW Dec 06 '22 at 14:29
  • But as Matteo said, I prefer breeds over just using different shapes when working with multiple types of turtles. – LeirsW Dec 06 '22 at 14:30
  • @Matteo No, I am not using breeds. Do you think I should use different breeds for males and females? – Am95 Dec 06 '22 at 14:32
  • @LeirsW I tried, but it isn't doing what it is intended, especially that I need to kill one of the turtles before changing its shape. – Am95 Dec 06 '22 at 14:32
  • @Am95 Well, you could for example always ask a female to change the shape to married, and then ask any male who has a "married" on their patch to die. – LeirsW Dec 06 '22 at 14:34

0 Answers0