Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.5 KB

README.md

File metadata and controls

21 lines (14 loc) · 1.5 KB

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