Jumping kangaroos

Jumping kangaroos preview image

1 collaborator

Elphinstone_se_040 Miguel Pais (Author)

Tags

children 

Tagged by Miguel Pais about 8 years ago

code example 

Tagged by Miguel Pais about 8 years ago

kangaroo 

Tagged by Miguel Pais about 8 years ago

shape 

Tagged by Miguel Pais about 8 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 5.3.1 • Viewed 431 times • Downloaded 33 times • Run 0 times
Download the 'Jumping kangaroos' 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

;----------------------------------------------------------------------
;The KANGAROO MODEL
;
;By Miguel Pessanha Pais
;----------------------------------------------------------------------

breed[kangaroos kangaroo]

to setup
  ca
  set-default-shape kangaroos "kangaroo"
  create-kangaroos 5 [
    set color brown
    set size 3
    set heading 270
  ]
  (foreach [0 1 2 3 4] [-10 -5 0 5 10] [
    ask kangaroo ?1 [set xcor ?2]
  ])

  ;create grass
  ask patches with [pycor < 0] [
   set pcolor 53
  ]
  ;create sky
  ask patches with [pycor >= 0] [
   set pcolor 87
  ]
  ;create sun
  ask patch -12 13 [
   set pcolor yellow
   ask patches in-radius 3 [
    set pcolor yellow
   ]
  ]

  reset-ticks
end 

to go
  ask kangaroos [do-what-kangaroos-do]
  tick
end 

to do-what-kangaroos-do
  set heading 290
  repeat 10 [
    fd 0.3
    display
  ]
  set heading 270
  repeat 3 [
    fd 0.3
    display
  ]
  set heading 250
  repeat 10 [
    fd 0.3
    display
  ]
  set heading 270
  fd 0.3
  display
end 

There is only one version of this model, created about 8 years ago by Miguel Pais.

Attached files

File Type Description Last updated
Jumping kangaroos.png preview Preview for 'Jumping kangaroos' about 8 years ago, by Miguel Pais Download

This model does not have any ancestors.

This model does not have any descendants.