As a fan of games, I want to model Convoy's game of life, with game starting from initial life state so that I can return state of life after each iteration.
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Return state of life after each iteration.
./gradlew clean build
./gradlew clean test
./gradlew clean run
Input Instructions -
- First input number (N) of live cells initially.
- Next N Lines, enter zero indexed row and column of live cells.
- Enter how many iterations(X) you want to view ?
./gradlew jacocoTestReport
- To view report open :
gameoflife/build/reports/tests/test/index.html
- Throws out of bound if memory limit is reached.
- Works for both predefined patterns and custom inputs.
- Automatically expands grid for patterns like glider.
Expanding Glider -
Expanding Lightweight Space Ship(LWSS) -
Expanding Gosper Glider Gun -