Skip to content

karel-rehor/lifeToy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lifeToy

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.

To Use

  1. Download and install the kagraph repository https:/karel-rehor/kagraph
  2. Setup influx connection properties in the file: ./src/test/resources/influx2.conf
  3. To write data to influx start an influx container: docker run --name influxdb -p 8086:8086 influxdb:2.3.0
  4. Test (Optional): mvn test
  5. Compile: mvn compile
  6. Install dependencies locally: mvn dependency:copy-dependencies
  7. 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.

  1. mvn package assembly:single
  2. 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.

TODO

  • Scripts
  • Tests
  • Cleanup

About

Educational project to leverage kagraph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages