Browse Source

Merge remote-tracking branch 'origin/main'

main
Thoumi Ngonga Brice 2 years ago
parent
commit
285fbdb108
  1. 23
      src/main/java/BattleShip/BSButton.java
  2. 2
      src/main/java/BattleShip/Direction.java

23
src/main/java/BattleShip/BSButton.java

@ -1,5 +1,26 @@
package BattleShip; 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;
}
} }

2
src/main/java/BattleShip/Direction.java

@ -1,6 +1,6 @@
package BattleShip; package BattleShip;
public class Direction {
class Direction {
int countHits, cellLocation; int countHits, cellLocation;

Loading…
Cancel
Save