Browse Source

Update Implementation AIGridGUI class

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

11
src/main/java/BattleShip/AIGridGUI.java

@ -464,6 +464,17 @@ public class AIGridGUI extends JPanel {
} }
clear = false; clear = false;
} }
if(e.getButton() == MouseEvent.BUTTON3) {
//Toggle whether ship placement is vertical or horizontal.
vertical = !vertical;
for(BSButton bsb : buttons) {
if(bsb.getCellContents() == null) {
bsb.setBorder(defaultBorder);
}
}
highlightCells(cell, 0);
}
} }
public void mouseExited(MouseEvent e) { public void mouseExited(MouseEvent e) {

Loading…
Cancel
Save