|
@ -24,7 +24,7 @@ public class AIGridGUI extends JPanel { |
|
|
boolean[] cellsKilled; |
|
|
boolean[] cellsKilled; |
|
|
boolean randomGuess = true; |
|
|
boolean randomGuess = true; |
|
|
int f; // it is the first |
|
|
int f; // it is the first |
|
|
Color Red = new Color(100, 0, 0); // |
|
|
|
|
|
|
|
|
Color darkRed = new Color(100, 0, 0); // |
|
|
Border loweredBevel = BorderFactory.createLoweredBevelBorder(); |
|
|
Border loweredBevel = BorderFactory.createLoweredBevelBorder(); |
|
|
Border raisedbevel = BorderFactory.createRaisedBevelBorder(); |
|
|
Border raisedbevel = BorderFactory.createRaisedBevelBorder(); |
|
|
Border defaultBorder; |
|
|
Border defaultBorder; |
|
@ -353,7 +353,7 @@ public class AIGridGUI extends JPanel { |
|
|
for(BSButton bu : buttons) { |
|
|
for(BSButton bu : buttons) { |
|
|
//Mark killed cells. |
|
|
//Mark killed cells. |
|
|
if(bu.getCellContents() == s) { |
|
|
if(bu.getCellContents() == s) { |
|
|
bu.setBackground(Red); |
|
|
|
|
|
|
|
|
bu.setBackground(darkRed); |
|
|
cellsKilled[bu.getGridLocation()] = true; |
|
|
cellsKilled[bu.getGridLocation()] = true; |
|
|
} |
|
|
} |
|
|
//Mark if any cell remains that has been hit but not yet killed. If so, lock onto that cell. |
|
|
//Mark if any cell remains that has been hit but not yet killed. If so, lock onto that cell. |
|
|