Changed the color of ships to white, as to make AI ships invisible.

This commit is contained in:
Joshua 2024-12-21 16:54:08 +01:00
parent cb9b110621
commit 8933a40d53
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ public class BoardDisplay extends JPanel {
/** /**
* Fügt Buttons zu Liste hinzu und aktualisiert Feld durch Aufruf von paintFields * Fügt Buttons zu Liste hinzu und aktualisiert Feld durch Aufruf von paintFields
* @param button * @param button Jeweiliger Button der hinzugefügt werden soll
* @author Joshua Kuklok * @author Joshua Kuklok
*/ */
public void addShipButton(ShipButton button) { public void addShipButton(ShipButton button) {
@ -32,7 +32,7 @@ public class BoardDisplay extends JPanel {
/** /**
* Gibt currentShip zurück * Gibt currentShip zurück
* @return currentShip * @return currentShip
* @author Lucas Bronson, Luca Conte, Joshua Kuklok * @author Joshua Kuklok
*/ */
public Ship getCurrentShip() { public Ship getCurrentShip() {
return currentShip; return currentShip;
@ -211,7 +211,7 @@ public class BoardDisplay extends JPanel {
} }
for(Ship ship: player.getBoard().getShips()) { for(Ship ship: player.getBoard().getShips()) {
if(ship.isShipOnPos(new Point(i,j))) { if(ship.isShipOnPos(new Point(i,j))) {
fields[i][j].setBackground(Color.LIGHT_GRAY); fields[i][j].setBackground(Color.WHITE);
} }
} }
HitResponse hit = this.player.getBoard().getHitResponseOnPoint(new Point(i, j)); HitResponse hit = this.player.getBoard().getHitResponseOnPoint(new Point(i, j));