|
|
@ -288,10 +288,13 @@ class LogicTest { |
|
|
|
matchfield.setState(expectedResult, Coordinate.HIT); |
|
|
|
logic.setMatchfield(matchfield); |
|
|
|
logic.setLastShot(center); |
|
|
|
logic.setTarget(empty); |
|
|
|
logic.setTarget(center); |
|
|
|
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); |
|
|
|
} |
|
|
|
|
|
|
|
} |