wip-fix-ai-players #25
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue