H7mw2.0 Englishprojectsize[744 426]turtles-have[]globals[]globals-list[globals-vars] shapes procedures text{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fnil MS Sans Serif;}{\f1\fnil\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fnil Arial;}{\f4\fswiss\fprq2 Arial;}{\f5\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f5\fs20 \\\\ The Game of Life \par \\\\ by Wendy Langeberg, MPH \par \\\\ under the instruction of Dr. Gary McCallister \par \\\\ Mesastate College, Grand Junction, CO \par \\\\ wlangebe@mesastate.edu \par \\\\ March 2002 \par \\\\ \par \\\\ First, create a grid and set an initial square dark. \par \\\\ Next, follow the rules of the Game of Life to determine if a square turns dark: \par \\\\ If the three squares above it are/have:\tab \tab \tab \tab Then the square is: \par \\\\\tab All dark squares\tab \tab \tab \tab \tab \tab White \par \\\\\tab All white squares\tab \tab \tab \tab \tab White \par \\\\\tab One dark square\tab \tab \tab \tab \tab Dark \par \\\\\tab A dark square followed by a dark, then a white sqare \tab White \par \\\\\tab A dark square followed by a white, then a dark square\tab White \par \\\\\tab A white square followed by two dark squares\tab \tab Dark \par \par to Go! \par gameoflife \par end \par \par to polygon :length :sides \par repeat :sides [FD :length RT 360.0 / :sides] \par end \par \par to square \par polygon 12 4 \par end \par \par to column \par repeat Generations [square fd 12] \par end \par \par to gridbegin \par ht cg pu setpos [-362 -203] \par pd repeat ((Generations * 2) + 1) [column rt 90 fd 12 lt 90 bk Generations * 12] \par pu home setpos [-362 -203] fd ((Generations * 12) - 6) rt 90 \par fd ((((Generations * 2) + 1) / 2) * 12) + 3 fill \par home setpos [-362 -203] \par end \par \par to gameoflife \par gridbegin \par setCounter3 Generations \par repeat (Generations - 1)[ \par setCounter2 0 \par repeat (((Generations * 2) + 1) - 2)[ \par home setpos [-362 -203] fd ((Counter3 * 12) - 6) \par rt 90 fd (6 + (12 * Counter2)) \par setCounter 0 setCounter1 0 \par if colorunder = 9 [setCounter 1] \par if colorunder = 9 [setCounter1 1] fd 12 \par if colorunder = 9 [setCounter (Counter + 1)] fd 12 \par if colorunder = 9 [setCounter (Counter + 1)] \par bk 12 rt 90 fd 12 \par if Counter = 1 [fill] \par if (AND Counter = 2 Counter1 = 0) [fill] \par setCounter2 (Counter2 + 1)] \par setCounter3 (Counter3 - 1)] \par end \par \plain\f3\fs20 \par } @-pagenamepage1curturtlet1curtexttext1transition0Dturtle-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]Cmouse-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]bg0$buffer$$6HZl~ 2DVhz .@Rdv*<N`r&8J\n"4FXj| 0BTfx,>Pbt(:L^p  $ 6 H Z l ~  2 D V h z  . @ R d v   * < N ` r   & 8 J \ n "4FXj| 0BTfx,>Pbt(:L^p$6HZl~ 2DVhz .@Rdv*<N`r&8J\n"4FXj| 0BTfx,>Pbt(:L^p$6HZl~ 2DVhz .@Rdvobject typet namet1locked?false xpos372 ypos213 shape0penstate0 size40pencolor0 heading0 pensize1shown?false fcn[] kind1shapeinturtlehave-list[has] colorin9objecttypeslidernameCounter1rect[627 278 120 18]show-name?truelocked?falsevisible?true min0 max1 current1value| 1|objecttypeslidernameCounterrect[627 231 120 18]show-name?truelocked?falsevisible?true min0 max3 current1value| 1|objecttypeslidernameCounter2rect[627 325 120 18]show-name?truelocked?falsevisible?true min0 max99current29value| 29|objecttypeslidernameCounter3rect[627 374 120 18]show-name?truelocked?falsevisible?true min0 max99 current1value| 1|object typetextnametext1rect[10 10 600 74]show-name?falselocked?falsevisible?truesnaped?falsewtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fnil MS Sans Serif;}{\f1\fnil\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fnil Arial;}{\f4\fswiss\fprq2 Arial;}{\f5\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f4\fs16\b Welcome to the Game of Life! \par \plain\f4\fs16 To run, set the Generations slider to the right to the number of Generations (rows) you desire and press Go! This creates a one-dimensional cellular automata. It illustrates how complex, unpredictable patterns can emerge from a set of simple rules.\plain\f4\fs16\b \par } objecttypeslidernameGenerationsrect[618 11 120 18]show-name?truelocked?falsevisible?true min0 max27current15value| 15|}objecttypebuttonnamebutton1rect[646 59 60 25]show-name?falselocked?false fcn[Go!] kind1