|
|
@ -10,6 +10,7 @@ public class Logic { |
|
|
|
|
|
|
|
private Matchfield matchfield; |
|
|
|
private Coordinate lastShot; |
|
|
|
public boolean foundShip = false; |
|
|
|
|
|
|
|
public Coordinate chooseField() { |
|
|
|
ArrayList<Coordinate> possibleFields = new ArrayList<Coordinate>(); |
|
|
@ -57,4 +58,12 @@ public class Logic { |
|
|
|
return matchfield; |
|
|
|
} |
|
|
|
|
|
|
|
public void findShip() { |
|
|
|
if (lastShot.getState() == Coordinate.HIT) { |
|
|
|
|
|
|
|
foundShip = true; |
|
|
|
} |
|
|
|
System.out.println("Do this"); |
|
|
|
} |
|
|
|
|
|
|
|
} |