add endScreen machanic

This commit is contained in:
ole 2024-12-20 17:30:21 +01:00
parent 7ef04711c3
commit f4cf28f4bf
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ public class LocalPlayer extends Player {
switch (hitResponse.getType()) { switch (hitResponse.getType()) {
case HIT, SUNK -> this.myTurn = false; case HIT, SUNK -> this.myTurn = false;
case MISS -> this.myTurn = true; case MISS -> this.myTurn = true;
case VICTORY -> System.out.println("Game Over"); //TODO Was halt bei victory passiert ist hier wurder verloheren case VICTORY -> GameController.getMainFrame().showPanelLoose("", this); //TODO Was halt bei victory passiert ist hier wurder verloheren
} }
GameController.getMainFrame().refreshGameBoard(); GameController.getMainFrame().refreshGameBoard();
} }
@ -33,7 +33,7 @@ public class LocalPlayer extends Player {
switch (hitResponse.getType()) { switch (hitResponse.getType()) {
case HIT, SUNK -> this.myTurn = true; case HIT, SUNK -> this.myTurn = true;
case MISS -> this.myTurn = false; case MISS -> this.myTurn = false;
case VICTORY -> System.out.println("Win"); // TODO was halt beim victory passier ist hier wurde gewonnen case VICTORY -> GameController.getMainFrame().showPanelWin("", this); // TODO was halt beim victory passier ist hier wurde gewonnen
} }
GameController.getMainFrame().refreshGameBoard(); GameController.getMainFrame().refreshGameBoard();
} }