|
@ -15,6 +15,7 @@ public class Logic { |
|
|
public boolean clearedAbove = false; |
|
|
public boolean clearedAbove = false; |
|
|
public boolean clearedBelow = false; |
|
|
public boolean clearedBelow = false; |
|
|
public boolean clearedRight = false; |
|
|
public boolean clearedRight = false; |
|
|
|
|
|
public boolean clearedLeft = false; |
|
|
|
|
|
|
|
|
public Coordinate chooseField() { |
|
|
public Coordinate chooseField() { |
|
|
ArrayList<Coordinate> possibleFields = new ArrayList<Coordinate>(); |
|
|
ArrayList<Coordinate> possibleFields = new ArrayList<Coordinate>(); |
|
@ -114,4 +115,13 @@ public class Logic { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void clearLeft(Coordinate shot) { |
|
|
|
|
|
target = matchfield.getLeft(shot); |
|
|
|
|
|
|
|
|
|
|
|
if (target.getState() == Coordinate.EMPTY) { |
|
|
|
|
|
clearedLeft = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |