Skip to content

pkritiotis/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game of life

This is a sample implementation of the game of life in go using faiface/pixel 2D game library (https://github.com/faiface/pixel).

Features:

  • Graphical User Interface with different colors representing the cell state and condition
    • #f5f5f5ff: Dead - the conditions don't allow a reproduction of a new cell in the next state
    • #bddfbdff: Dead - a new cell will be reproduced in the next state
    • #228b22ff: Live Cell - not in danger
    • #ff4500ff: Live Cell - Overpopulated - will die in the next state
    • #ff8c00ff: Live Cell - Underpopulated - will die in the next state
  • Customizable width, height, cell size, and framerate (see Usage)
  • A new random board is populated at every run

Running the game

To run the game run make run in the root directory of the repo.

Usage

  -cellSize int
    	The pixel size of each cell (default 30)
  -frameRate duration
    	The framerate in milliseconds (default 500ms)
  -height float
    	The pixel size of the height of the grid (default 300)
  -width float
    	The pixel size of the width of the grid (default 600)

About

A simple go implementation of game of life with a graphical interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published