Playing around with library developed under kagraph.
A primitive implementation of the Life game for education and amusement. Each turn grid cells spawn life into adjacent cells, then die off when overcrowded.
- Download and install the kagraph repository https://github.com/karel-rehor/kagraph
- Setup influx connection properties in the file:
./src/test/resources/influx2.conf
- To write data to influx start an influx container:
docker run --name influxdb -p 8086:8086 influxdb:2.3.0
- Test (Optional):
mvn test
- Compile:
mvn compile
- Install dependencies locally:
mvn dependency:copy-dependencies
- Run:
java -classpath target/classes:./target/dependency/* org.kagaka.life.LifeRunner -w 15 -h 10 -t 10 -i
Or after installing kagraph and setting up influx (from step 4 above) build and run the jar.
mvn package assembly:single
java -jar target/lifeToy.jar -t 10 -w 15 -h 10
Command line arguments
-w,--width
- width of the life grid.-h,--height
- height of the life grid.-t,--turns
- number of turns to play. N.B.-1
to run indefinitely.-p,--pause
- number of milliseconds to pause between turns.-i,--influx
- toggle on writes of data to influxdb, which is switched off by default.
- Scripts
- Tests
- Cleanup