Breed Procedures Example
Model was written in NetLogo 5.0.4
•
Viewed 724 times
•
Downloaded 88 times
•
Run 2 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Click to Run Model
breed [dogs dog] breed [cats cat] breed [cows cow] to setup clear-all set-default-shape dogs "dog" set-default-shape cats "cat" set-default-shape cows "cow" ask patch 0 1 [ sprout-dogs 1 ] ask patch 0 0 [ sprout-cats 1 ] ask patch 0 -1 [ sprout-cows 1 ] end to go ;; "turtles" refers to all of the turtles, ;; no matter what breed they are ask turtles [ ;; each turtle takes its breed, adds "-speak" ;; onto it, and then runs that procedure run word breed "-speak" ] end ;; Here we have the separate procedure definitions ;; for each breed. to dogs-speak ;; dog procedure set label "arf arf!" end to cats-speak ;; cat procedure set label "meow!" end to cows-speak ;; cow procedure set label "mooooo!" end ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There are 10 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Breed Procedures Example.png | preview | Preview for 'Breed Procedures Example' | over 11 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.