

We used the now familiar “$10,000 X your spin” modifier to keep things balanced and engaging with an element of chance. “$10,000 X your spin at graduation to get your new base pay!” Me: “Let’s fix the problems you mentioned and make this more realistic!” Me: “What if we make this game better, Girls?” With a little encouragement, some slightly leading questions and examples based on their critiques of the game, we addressed their concerns and made the game more fun with some prototyping and play-testing. Kids are naturals at game design and we naturally tweak the rules when playing. Why can’t you sell your house when you retire at the end of the game? There’s no point buying a more expensive house.Why is the resale value of a house set in advance?.Why can you only go back to school to learn a new job?.The other careers in the game are not fairly compensated – what about commissions and bonuses?.We uncovered a lot of other customer problems, including: This was a good conversation and me feel like I was doing a good job as a parent to inspire and educate my children. “Is this game just trying to brainwash kids to become doctors and lawyers?” “Yeah, and in real life you can be a success in a lot of those other jobs.” “Because you’ll only win if you’re a doctor or a lawyer.” Since it was raining they tolerated me asking why a little more than usual. After a couple rounds the kids got frustrated with the predictability of the game. We will call this function from the window.onload.Īdd the following to gol.js.During some rainy days on a cottage vacation we spent some time playing Milton Bradley’s classic, The Game of Life. Then we will create a function, createWorld(), which will build the table, row by row, column by column and cell by cell. We need some variables to store how many rows and columns we want in our table. Note: In the original Game of Life, the world should be infinite. Whether a cell is inhabited (alive) or not (dead) is part of the initial configuration as well as the evolutionary process determined by the rules. Next we will write the JavaScript for our world grid. Again, this is the visual for the player.įirst we will add a element to contain the world grid in index.html and then build the HTML table and append it to the div. Game of Life The Steps Step One - Build the Worldįirst we want to build our “world”, world grid, where our population will thrive (or not.) This will be done using an HTML table built with JavaScript. Add the style sheet reference in the head.Add the script reference to our gol.js in the body.Create a Style Sheet file called gol.css that will contain all the styling we need.
THE GAME OF LIFE COMPUTER GAME CODE
Create a JavaScript file called gol.js that will contain all the JavaScript code we need.ģ. I will be using Visual Studio Code but any editor in which you can create HTML, CSS and JavaScript will do.

We will use two-dimensional arrays to keep track of the current generation and the next generation, which is created after applying the rules. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.Any live cell with more than three live neighbors dies, as if by overcrowding.Any live cell with two or three live neighbors lives on to the next generation.

