This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

danpost
danpost presents ...

2012/12/12

Game of Life Type2

This version of Conway's Game of Life simulation has only one world class and no actor classes. The world class is 176 lines long; 33 of which are comment lines. It starts with a grid of 5625 cells (75 x 75) and can range from a 5 x 5 grid to a 100 x 100 grid using the arrow keys.
Aside from the arrow keys, the following keys are enabled:

"enter" - starts and stops the continuous execution of the life cycles
"space" - executes one single life cycle
"1" to "4" - zoom in on a quadrant of current visible grid
"escape" - zoom out from last selected quadrant
"x" - clears the grid of active cells
"c" - changes the color for the active cells
"p" - changes the absent color part of active cells
"r" - randomizes the grid of cells (turns aproximately 25 percent of them on; the others off)
"w" - toggles world-wrapping on and off
"g" - toggles showing of grid-lines on and off

You can also toggle the active state of a grid square by clicking the mouse on it.

The quadrants are numbered "1" for top-left, "2" for top-right, "3" for bottom-left, and "4" for bottom-right.

3532 views / 13 in the last 7 days

1 vote | 0 in the last 7 days

Tags: simulation with-source conway danpost

open in greenfoot
Your browser does not support the canvas tag.
tylerstylers

2012/12/12

could we see source?
A new version of this scenario was uploaded on Wed Dec 12 22:18:31 UTC 2012 164-line totally world class version of Conway's Game of Life simulation. Open source.
lonely.girllonely.girl

2012/12/12

great & well explained
danpostdanpost

2012/12/12

@lonely.girl, thanks.
A new version of this scenario was uploaded on Thu Dec 13 13:56:46 UTC 2012 163-line world, no-actor take on Conway's Game of Life with extras.
A new version of this scenario was uploaded on Fri Dec 14 15:56:37 UTC 2012 A one-world take on Conway's Game of Life with many extras.
A new version of this scenario was uploaded on 2020-10-30 20:10:58 UTC

Want to leave a comment? You must first log in.

Who likes this?

lonely.girl