Skip to content

Command-line based version of Conway’s Game Of Life.

Notifications You must be signed in to change notification settings

Giorgos-Arg/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

game-of-life

This java program implements Conway’s Game Of Life.

Usage

Compilation:

javac *.java

Run:

java RunGameOfLife

Example

java RunGameOfLife

*** Welcome to the Game of Life! ***

Give the grid's height: 10

Give the grid's width: 10

Give the number of generations: 5

The initial grid:
 ____________________
| - - - # # # # # - - |
| - # - - - # # # - # |
| - # # # - - # # # # |
| # - # # # # # # - - |
| # - - - - # # - # # |
| # - # - - # # - - # |
| - # # # - # - # - # |
| - # - # # # - - - - |
| # - # # # - - - # # |
| # - - - # # - # # - |
 ____________________

Generation 1:
 ____________________
| - - - - # - - # # - |
| - # - - - - - - - # |
| # - - - - - - - - # |
| # - - - - - - - - - |
| # - # - - - - - # # |
| # - # # - - - - - # |
| # - - - - - - - # - |
| # - - - - # # - - # |
| # - # - - - # # # # |
| - # - - # # - # # # |
 ____________________

Generation 2:
 ____________________
| - - - - - - - - # - |
| - - - - - - - - - # |
| # # - - - - - - - - |
| # - - - - - - - # # |
| # - # # - - - - # # |
| # - # # - - - - - # |
| # - - - - - - - # # |
| # - - - - # # - - # |
| # - - - # - - - - - |
| - # - - - # - - - # |
 ____________________

Generation 3:
 ____________________
| - - - - - - - - - - |
| - - - - - - - - - - |
| # # - - - - - - # # |
| # - # - - - - - # # |
| # - # # - - - - - - |
| # - # # - - - - - - |
| # - - - - - - - # # |
| # # - - - # - - # # |
| # # - - # - # - - - |
| - - - - - - - - - - |
 ____________________

Generation 4:
 ____________________
| - - - - - - - - - - |
| - - - - - - - - - - |
| # # - - - - - - # # |
| # - # # - - - - # # |
| # - - - - - - - - - |
| # - # # - - - - - - |
| # - # - - - - - # # |
| - - - - - # - # # # |
| # # - - - # - - - - |
| - - - - - - - - - - |
 ____________________

Generation 5:
 ____________________
| - - - - - - - - - - |
| - - - - - - - - - - |
| # # # - - - - - # # |
| # - # - - - - - # # |
| # - - - - - - - - - |
| # - # # - - - - - - |
| - - # # - - - # - # |
| # - - - - - # # - # |
| - - - - - - # - # - |
| - - - - - - - - - - |
 ____________________

*** End of the Game of Life! ***

Author

Giorgos Argyrides (g.aryrides@outlook.com)

About

Command-line based version of Conway’s Game Of Life.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages