Browse Source

Add Methode void StartGame and BuildGui to class Bship

main
Thoumi Ngonga Brice 2 years ago
parent
commit
246b0991b0
  1. 1
      src/main/java/BattleShip/AIGridGUI.java
  2. 20
      src/main/java/BattleShip/BShip.java

1
src/main/java/BattleShip/AIGridGUI.java

@ -8,6 +8,7 @@ import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.*;
public class AIGridGUI extends JPanel {
ArrayList<BSButton> buttons = new ArrayList<BSButton>();
ArrayList<Ship> allShips = new ArrayList<Ship>();

20
src/main/java/BattleShip/BShip.java

@ -1,4 +1,24 @@
package BattleShip;
public class BShip {
public GridGUI grid1;
public AIGridGUI grid2;
int rows = 10;
int columns = 10;
public void startGame() {
//Create grids and rest of GUI.
grid1 = new GridGUI(rows, columns);
grid1.build();
grid2 = new AIGridGUI(rows, columns);
buildGUI();
}
public void buildGUI() {}
}
Loading…
Cancel
Save