|
@ -288,10 +288,13 @@ class LogicTest { |
|
|
matchfield.setState(expectedResult, Coordinate.HIT); |
|
|
matchfield.setState(expectedResult, Coordinate.HIT); |
|
|
logic.setMatchfield(matchfield); |
|
|
logic.setMatchfield(matchfield); |
|
|
logic.setLastShot(center); |
|
|
logic.setLastShot(center); |
|
|
logic.setTarget(empty); |
|
|
|
|
|
|
|
|
logic.setTarget(center); |
|
|
logic.setFoundShip(true); |
|
|
logic.setFoundShip(true); |
|
|
|
|
|
|
|
|
Coordinate result = logic.chooseField(logic.getEverySecondField()); |
|
|
|
|
|
|
|
|
logic.chooseField(logic.getEverySecondField()); // first Shot |
|
|
|
|
|
Coordinate result = logic.chooseField(logic.getEverySecondField()); // second Shot |
|
|
|
|
|
|
|
|
assertEquals(result, expectedResult); |
|
|
assertEquals(result, expectedResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |