Color swap

Color swap preview image

1 collaborator

Default-person mason lack (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.4.0 • Viewed 10 times • Downloaded 2 times • Run 0 times
Download the 'Color swap' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

to setup ca crt 20 [ setxy random-xcor random-ycor set color one-of [ red green blue]] reset-ticks end

to swap-colors [t1 t2]
  let temp [color] of t1
  ask t1 [ set color [color] of t2 ]
  ask t2 [ set color temp ]
end 

to go
  ask turtles [
    let partner one-of (turtles in-radius 2)
    if partner != nobody [
      swap-colors self partner

    ]
    rt random 30 - 15
    fd .5
  ]
  tick
end 

There is only one version of this model, created 3 days ago by mason lack.

Attached files

File Type Description Last updated
Color swap.png preview Preview for 'Color swap' 3 days ago, by mason lack Download

This model does not have any ancestors.

This model does not have any descendants.