In this program, I need to write Game of Life with the most beautiful code that I can write, with the details as:
- The problem statement can be found on Wikipedia (Keyword: Conway's Game of Life)
- Use Java as the language
- Write the most beautiful code as possible
- The format of input and output is up to you
- Infinite grid is possible, array out of bound exception is possible
- You need to keep it only in your local Git
And the rules of Game of Life are:
- 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.
These rules can be concluded as:
- Any live cell with two or three live neighbours survives.
- Any dead cell with three live neighbours becomes a live cell.
- All others live cells die in the next generation. Similarly, all other dead cells stay dead.
- Have an IDE for Java installed (e.g. Netbeans, Intellij, Eclipse)
- JDK 11.0 or higher installed (see this link for installation)
- JUnit 5.0 or higher installed, for running the tests (see this link for installation)
- Open a terminal
- Change the working directory into the current project directory
- Execute
./gradlew build
in your terminal
TBD
- Open a terminal
- Change the working directory into the current project directory
- Execute
./gradlew test
in your terminal