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