|
|
@ -12,10 +12,10 @@ public class Logic { |
|
|
|
private Coordinate lastShot; |
|
|
|
public Coordinate target; |
|
|
|
private boolean foundShip = false; |
|
|
|
public boolean clearedAbove = false; |
|
|
|
public boolean clearedBelow = false; |
|
|
|
public boolean clearedRight = false; |
|
|
|
public boolean clearedLeft = false; |
|
|
|
private boolean clearedAbove = false; |
|
|
|
private boolean clearedBelow = false; |
|
|
|
private boolean clearedRight = false; |
|
|
|
private boolean clearedLeft = false; |
|
|
|
|
|
|
|
public Coordinate chooseField() { |
|
|
|
ArrayList<Coordinate> possibleFields = new ArrayList<Coordinate>(); |
|
|
@ -124,4 +124,20 @@ public class Logic { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public boolean getClearedAbove() { |
|
|
|
return this.clearedAbove; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean getClearedBelow() { |
|
|
|
return this.clearedBelow; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean getClearedRight() { |
|
|
|
return this.clearedRight; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean getClearedLeft() { |
|
|
|
return this.clearedLeft; |
|
|
|
} |
|
|
|
} |