Browse Source

Update Implementation AIGridGUI class

main
Thoumi Ngonga Brice 2 years ago
parent
commit
ceca0a7287
  1. 10
      src/main/java/BattleShip/AIGridGUI.java

10
src/main/java/BattleShip/AIGridGUI.java

@ -437,7 +437,9 @@ public class AIGridGUI extends JPanel {
class SetShipsListener implements MouseListener {
public void mouseEntered(MouseEvent e) {
//Highlight cell when mouse entered.
BSButton cell = (BSButton) e.getSource();
highlightCells(cell, 0);
}
public void mouseReleased(MouseEvent e) {
@ -450,4 +452,10 @@ public class AIGridGUI extends JPanel {
public void mouseClicked(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
}
public void highlightCells(BSButton b, int x) {
BSButton cell = b;
int actionToTake = x;
clear = true;
}
}
Loading…
Cancel
Save