diff --git a/src/main/java/BattleShip/BSButton.java b/src/main/java/BattleShip/BSButton.java index 130af7e..3262b23 100644 --- a/src/main/java/BattleShip/BSButton.java +++ b/src/main/java/BattleShip/BSButton.java @@ -1,5 +1,26 @@ package BattleShip; -public class BSButton { +import javax.swing.*; + +public class BSButton extends JButton { + + int gridLocation; + Ship cellContents = null; + + public void setGridLocation(int l) { + gridLocation = l; + } + + public int getGridLocation() { + return gridLocation; + } + + public void setCellContents(Ship s) { + cellContents = s; + } + + public Ship getCellContents() { + return cellContents; + } } \ No newline at end of file diff --git a/src/main/java/BattleShip/Direction.java b/src/main/java/BattleShip/Direction.java index 19cedde..29dcc6f 100644 --- a/src/main/java/BattleShip/Direction.java +++ b/src/main/java/BattleShip/Direction.java @@ -1,6 +1,6 @@ package BattleShip; -public class Direction { +class Direction { int countHits, cellLocation;