Browse Source

add Setter for ClearedAbove

fleetstorm
Max Wenzel 3 years ago
committed by Lorenz Hohmann
parent
commit
3ddb76e0ab
  1. 9
      src/main/java/de/tims/fleetstorm/ai/Logic.java
  2. 9
      src/test/java/de/tims/fleetstorm/ai/LogicTest.java

9
src/main/java/de/tims/fleetstorm/ai/Logic.java

@ -147,4 +147,13 @@ public class Logic {
public boolean getClearedLeft() {
return this.clearedLeft;
}
public void sinkShip() {
// TODO Auto-generated method stub
}
public void setClearedAbove(boolean b) {
this.clearedAbove = b;
}
}

9
src/test/java/de/tims/fleetstorm/ai/LogicTest.java

@ -203,4 +203,13 @@ class LogicTest {
assertEquals(logic.getClearedLeft(), false);
assertEquals(logic.getClearedRight(), false);
}
@Test
void testSetterClearedAbove() {
Logic logic = new Logic();
logic.setClearedAbove(true);
assertEquals(logic.getClearedAbove(), true);
}
}
Loading…
Cancel
Save