|
|
@ -1,12 +1,22 @@ |
|
|
|
package BattleShip; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
public class GridGUI { |
|
|
|
|
|
|
|
ArrayList<BSButton> buttons = new ArrayList<BSButton>(); |
|
|
|
ArrayList<Ship> allShips = new ArrayList<Ship>(); |
|
|
|
int[] testLocations; |
|
|
|
int numOfGuesses = 0; |
|
|
|
int rows; |
|
|
|
int columns; |
|
|
|
|
|
|
|
Ship destroyer = new Ship(2, "destroyer"); |
|
|
|
Ship cruiser = new Ship(3, "cruiser"); |
|
|
|
Ship submarine = new Ship(3, "submarine"); |
|
|
|
Ship battleship = new Ship(4, "battleship"); |
|
|
|
Ship aircraftCarrier = new Ship(5, "aircraft carrier"); |
|
|
|
|
|
|
|
public GridGUI(int r, int c) { |
|
|
|
rows = r; |
|
|
|
columns = c; |
|
|
|