Browse Source

Update Methode void BuildGui

main
Thoumi Ngonga Brice 2 years ago
parent
commit
c606b50cda
  1. 18
      src/main/java/BattleShip/BShip.java
  2. BIN
      target/classes/BattleShip/AIGridGUI$DirectionCompare.class
  3. BIN
      target/classes/BattleShip/AIGridGUI$SetShipsListener.class
  4. BIN
      target/classes/BattleShip/AIGridGUI.class
  5. BIN
      target/classes/BattleShip/BShip.class

18
src/main/java/BattleShip/BShip.java

@ -1,8 +1,12 @@
package BattleShip; package BattleShip;
import javax.swing.*;
public class BShip { public class BShip {
public GridGUI grid1; public GridGUI grid1;
JPanel thePanel = new JPanel();
JMenuItem[] boardSize = new JMenuItem[3];
public AIGridGUI grid2; public AIGridGUI grid2;
int rows = 10; int rows = 10;
int columns = 10; int columns = 10;
@ -19,6 +23,18 @@ public class BShip {
buildGUI(); buildGUI();
} }
public void buildGUI() {}
public void buildGUI() {
thePanel.setLayout(new BoxLayout(thePanel, BoxLayout.PAGE_AXIS));
thePanel.add(grid1);
//Setup menu with options for new game, varying board sizes, and auto placement of ships.
boardSize[0] = new JMenuItem("8x8");
boardSize[1] = new JMenuItem("10x10");
boardSize[2] = new JMenuItem("12x12");
}
} }

BIN
target/classes/BattleShip/AIGridGUI$DirectionCompare.class

BIN
target/classes/BattleShip/AIGridGUI$SetShipsListener.class

BIN
target/classes/BattleShip/AIGridGUI.class

BIN
target/classes/BattleShip/BShip.class

Loading…
Cancel
Save