Skip to content

Harry-Whitehorn/GameofLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameOfLife

Conway's Game of Life written in Processing.

Features

  • Dynamic grid size

  • Play and step options

  • Adjustable step speed

  • Save and load grids

Controls

  • p to print grid to terminal

  • SPACE to start / stop autostep

  • ENTER to step through

  • +/- to adjust step speed

  • s to save grid to file

  • l to load grid from file

  • r to reset grid to blank

Saving and Loading

Saving

Grid is saved to gridSave.txt. Grid is converted into a string. Active tiles are replaced with an 'O' (CAPITAL O [as in Oscar]) and inactive tiles are replaced with a '.' (FULLSTOP).

Loading

Grid is loaded from gridSave.txt. If the savedGrid size is larger than the screenGrid size, the load will fail. If the savedGrid size is smaller than the screenGrid size, the savedGrid will be loaded at its size and then the remaining tiles will be empty.

Examples

Glider

OOO
O..
.O.

About

Conway's Game of Life - Written in processing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published