Linear+Code


 * < Linear <

globals [ticks] breed [ draw ] breed [ erase ]

to setup ca cct 1 [ set color white fd 1 pd ] end

to add-draw cct 1 [ setxy 0 0 set heading 0 pd] end

to add-erase cct 1 [ set color red setxy 0 0 set heading 0 pe] end

to go ask turtles [ move ] set ticks (ticks + 1) end
 * if ticks = 15500 [ stop ]
 * reproduce** ;; the additional movement involved in reproduction is here removed, alowing for the simpler movment
 * die**

to move let num-turtles-right 0 let num-turtles-left 0

ifelse ((random 2) = 0) [ go-left set num-turtles-left (num-turtles-left + 1) ] [ go-right set num-turtles-right (num-turtles-right + 1) ] end

to go-left lt 45 one-pace end

to go-right rt 45 one-pace end

to one-pace fd 1 set heading 0 end
 * fd 1

to reproduce hatch 1 [ fd 1 ] end


 * <linear<