diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..a1757ae --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <annotationProcessing> + <profile default="true" name="Default" enabled="true" /> + </annotationProcessing> + </component> +</project> \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3126fcf..d223ea5 100644 --- a/build.gradle +++ b/build.gradle @@ -13,4 +13,6 @@ repositories { dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' + compileOnly 'org.projectlombok:lombok:1.18.10' + annotationProcessor 'org.projectlombok:lombok:1.18.10' } diff --git a/src/main/java/evironment/antGame/AntWorld.java b/src/main/java/evironment/antGame/AntWorld.java new file mode 100644 index 0000000..a6cfda4 --- /dev/null +++ b/src/main/java/evironment/antGame/AntWorld.java @@ -0,0 +1,28 @@ +package evironment.antGame; + +import core.DiscreteAction; +import core.Observation; +import core.RNG; +import core.StepResult; + +public class AntWorld { + private Grid grid; + + public AntWorld(int width, int height, double foodDensity){ + grid = new Grid(width, height, foodDensity); + } + + public AntWorld(){ + this(30, 30, 0.1); + } + + public StepResult step(DiscreteAction<AntAction> action){ + Observation observation = new AntObservation(); + return new StepResult(observation, 0.0, false, ""); + } + + public void reset(){ + RNG.reseed(); + grid.initCells(); + } +}