From 26bac94b5d282d529e9391ce53a99701d6ef8eb1 Mon Sep 17 00:00:00 2001 From: Max Wenzel Date: Thu, 16 Dec 2021 12:58:24 +0100 Subject: [PATCH] ai chooseField returns not null --- .gitignore | 2 +- src/main/java/de/tims/fleetstorm/ai/Logic.java | 9 +++++++++ .../java/de/tims/fleetstorm/ai/LogicTest.java | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/main/java/de/tims/fleetstorm/ai/Logic.java create mode 100644 src/test/java/de/tims/fleetstorm/ai/LogicTest.java diff --git a/.gitignore b/.gitignore index 046bbd6..4826ec9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,4 @@ local.properties .classpath # VsCode -.vscode/ \ No newline at end of file +.vscode/ diff --git a/src/main/java/de/tims/fleetstorm/ai/Logic.java b/src/main/java/de/tims/fleetstorm/ai/Logic.java new file mode 100644 index 0000000..359fcbd --- /dev/null +++ b/src/main/java/de/tims/fleetstorm/ai/Logic.java @@ -0,0 +1,9 @@ +package de.tims.fleetstorm.ai; + +public class Logic { + + public int[] chooseField() { + return new int[] {}; + } + +} diff --git a/src/test/java/de/tims/fleetstorm/ai/LogicTest.java b/src/test/java/de/tims/fleetstorm/ai/LogicTest.java new file mode 100644 index 0000000..76fe7f2 --- /dev/null +++ b/src/test/java/de/tims/fleetstorm/ai/LogicTest.java @@ -0,0 +1,16 @@ +package de.tims.fleetstorm.ai; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import org.junit.jupiter.api.Test; + +class LogicTest { + Logic logic = new Logic(); + + @Test + void testFielIsNotNull() { + int[] calcResult = logic.chooseField(); + assertNotNull(calcResult); + } + +}