Browse Source

Refact6oring: ai-logicTest restructured

fleetstorm
Max Wenzel 3 years ago
committed by Lorenz Hohmann
parent
commit
d847e33ef5
  1. 12
      src/test/java/de/tims/fleetstorm/ai/LogicTest.java

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

@ -9,12 +9,13 @@ import de.tims.fleetstorm.matchfield.Coordinate;
import de.tims.fleetstorm.matchfield.Matchfield;
class LogicTest {
Logic logic = new Logic();
int size = 3;
private Matchfield matchfield = new Matchfield(size);
@Test
void testFieldIsNotNull() {
Logic logic = new Logic();
Matchfield matchfield;
int size = 5;
matchfield = new Matchfield(size);
matchfield.createMatchfield();
Coordinate calcResult = logic.chooseField(matchfield);
assertNotNull(calcResult);
@ -22,7 +23,12 @@ class LogicTest {
@Test
void testChoosenFieldHasNotStateShot() {
Logic logic = new Logic();
Matchfield matchfield;
int size = 5;
matchfield = new Matchfield(size);
matchfield.createMatchfield();
for (int x = 0; x < size; x++) {
for (int y = 0; y < size; y++) {
// matchfield.setState(x, y, Matchfield.SHOT);

Loading…
Cancel
Save