Welcome to the George Backend Chapter - Code Retreat!
Have a wonderful and fun day.
This project is already setup to be used with gradle
as well as maven
.
You can code in java
or kotlin
.
Import gradle.kts
into IntelliJ
Run:
./gradlew clean check
Import pom.xml
into IntelliJ
Run:
./mvnw clean verify
Any live cell with fewer than two live neighbours dies.
┌─┬─┬─┐ ┌─┬─┬─┐
│ │ │ │ │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│ │█│ │ => │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│ │ │░│ │ │ │ │
└─┴─┴─┘ └─┴─┴─┘
Any live cell with two or three live neighbours lives on.
┌─┬─┬─┐ ┌─┬─┬─┐
│ │ │ │ │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│░│█│ │ => │ │█│ │
├─┼─┼─┤ ├─┼─┼─┤
│░│░│ │ │ │ │ │
└─┴─┴─┘ └─┴─┴─┘
Any live cell with more than three live neighbours dies.
┌─┬─┬─┐ ┌─┬─┬─┐
│░│░│░│ │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│░│█│░│ => │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│░│░│░│ │ │ │ │
└─┴─┴─┘ └─┴─┴─┘
Any dead cell with exactly three live neighbours becomes alive.
┌─┬─┬─┐ ┌─┬─┬─┐
│ │ │ │ │ │ │ │
├─┼─┼─┤ ├─┼─┼─┤
│░│ │ │ => │ │█│ │
├─┼─┼─┤ ├─┼─┼─┤
│ │░│░│ │ │ │ │
└─┴─┴─┘ └─┴─┴─┘