Ambika's NetLogo Project

Ambika's NetLogo Project preview image

1 collaborator

Default-person A Mahto (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.0 • Viewed 109 times • Downloaded 8 times • Run 0 times
Download the 'Ambika's NetLogo Project' 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

turtles-own [ message? ]

to setup
  ; this will set up the simulation
  ; clear the space
  clear-all
  ; create the number of turtles the user asks for
  create-turtles population
  [
    set message? false
    setxy random-xcor random-ycor
  ]
  ; reset the time to zero
  reset-ticks
  ; ask all of the turtles to be size 3 and white
  ; ask all of the turtles to be in a random position
  ; set the turtle shape to the animal that the user asks for
  ask turtles [
    set shape Animal
    set size 3
    set color white
  ]
  ; ask one turtle to change color to red and size to 4
  ; set its message to be true
  ask n-of 1 turtles [
    set color red
    set size 4
    set message? true
  ]
end 

to go
  ask turtles [
    right random ( 90 * one-of [1 -1] ) forward 3
    if any? other turtles-here with [ message? ] [
      set color red
      set size 4
      set message? true
    ]
  ]
  if count turtles with [ message? ] = population [ stop ]
  tick
end 

There is only one version of this model, created about 3 years ago by A Mahto.

Attached files

File Type Description Last updated
Ambika's NetLogo Project.png preview Preview for 'Ambika's NetLogo Project' about 3 years ago, by A Mahto Download

This model does not have any ancestors.

This model does not have any descendants.