Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select/ask more breeds at once?

I have 8 different breeds in my model. Some of them share similar traits. Anyway, lets suppose that my breeds are

breed [ humans human ]
breed [ dogs dog ]
breed [ cats cat ]
breed [ horses horse ]
breed [ elephants elephant ]
breed [ mouses mouse ]
breed [ monkeys monkey ]
breed [ birds bird ]

My question is how to ask for example everyone except birds. I don't want to ask each breed individually. I know that when you want to ask every breed than you go with ask turtles.

like image 258
Anajlim Avatar asked Nov 23 '25 03:11

Anajlim


1 Answers

You will want some combination of turtle-set and member? primitives. For example, let wanted (turtle-set humans horses mouses) will get an agentset named 'wanted' with all the humans, horses and mouses. For your specific example, let wanted turtles with [not member? self birds] will get all the turtles except birds.

like image 174
JenB Avatar answered Nov 24 '25 23:11

JenB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!