From d84022265eba001a389585c6b00610893d455947 Mon Sep 17 00:00:00 2001 From: Max Wenzel Date: Fri, 14 Jan 2022 13:40:49 +0100 Subject: [PATCH] add Setter for ClearedAbove --- src/main/java/de/tims/fleetstorm/ai/Logic.java | 9 +++++++++ src/test/java/de/tims/fleetstorm/ai/LogicTest.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/de/tims/fleetstorm/ai/Logic.java b/src/main/java/de/tims/fleetstorm/ai/Logic.java index 98db585..42e9415 100644 --- a/src/main/java/de/tims/fleetstorm/ai/Logic.java +++ b/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; + } } diff --git a/src/test/java/de/tims/fleetstorm/ai/LogicTest.java b/src/test/java/de/tims/fleetstorm/ai/LogicTest.java index b89fe84..1e74ea3 100644 --- a/src/test/java/de/tims/fleetstorm/ai/LogicTest.java +++ b/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); + } + }