Skip to content
/ conway Public

Resources to be used for playing around with implementing Conway's Game of Life

Notifications You must be signed in to change notification settings

urug/conway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway

Conway's Game of Life is a classic cellular automaton game. It has no players and only 3 rules. This makes it a great candidate for use in exercises that you want to be able to complete in a short time.

Helpful Resources

For anyone who hasn't written an implementation of Conway's Game of Life before here are some links that might be helpful to look up as reference material:

Suggested Structure

It is usually easiest to implement Conway's game of life in such a way that you start with just a text file that represents the initial state of the world. Generally these files represent dead cells with "." and live cells with "o". See the examples directory.

Your program will generally start by parsing the initial state and then running a loop that does something like:

  1. Clear the terminal (the ANSI escape sequence to clear the terminal and move to the top-left is "\033[2J\033[1;1H")
  2. Print the current board as a string
  3. Apply the 3 rules to update the board
  4. Sleep for a few milliseconds

About

Resources to be used for playing around with implementing Conway's Game of Life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published