@ -45,7 +45,7 @@ public class Coordinate {
}
public boolean shoot() {
if (this.state == Coordinate.SHOT)
if (this.state == Coordinate.SHOT || this.state == Coordinate.HIT)
return false;
if (this.state == Coordinate.SHIP) {
@ -76,6 +76,9 @@ class CoordinateTest {
assertTrue(matchfield.getField(0, 0).shoot());
assertFalse(matchfield.getField(0, 0).shoot());
matchfield.getField(3, 4).shoot();
assertFalse(matchfield.getField(3, 4).shoot());