|
@ -92,5 +92,13 @@ class MatchfieldShipTest { |
|
|
|
|
|
|
|
|
boolean calulatedResult = matchfield.areAllShipsHit(); |
|
|
boolean calulatedResult = matchfield.areAllShipsHit(); |
|
|
assertFalse(calulatedResult); |
|
|
assertFalse(calulatedResult); |
|
|
|
|
|
|
|
|
|
|
|
matchfield.getField(0, 0).setState(Coordinate.HIT); |
|
|
|
|
|
matchfield.getField(0, 1).setState(Coordinate.HIT); |
|
|
|
|
|
matchfield.getField(0, 2).setState(Coordinate.HIT); |
|
|
|
|
|
matchfield.getField(0, 3).setState(Coordinate.HIT); |
|
|
|
|
|
matchfield.getField(0, 4).setState(Coordinate.HIT); |
|
|
|
|
|
calulatedResult = matchfield.areAllShipsHit(); |
|
|
|
|
|
assertTrue(calulatedResult); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |