win and lose label

This commit is contained in:
2025-10-30 17:19:43 +01:00
parent fafe5b03fa
commit afd201f250

View File

@@ -258,7 +258,7 @@ public class Game {
} }
public void nextTurn() { public void nextTurn() {
// end of if // end of if
if (white_chips == 0 && black_chips == 0) { if (white_chips == 0 && black_chips == 0 && game_state != 4) {
game_state = 1; game_state = 1;
hideAllButtons(); hideAllButtons();
if (current_selection != null) { if (current_selection != null) {
@@ -276,9 +276,13 @@ public class Game {
} }
else { else {
if (game_state != 4) {
game_state = 0; game_state = 0;
} // end of if
} }
if(game_state != 4) {
if (currentTurnPlayer == "White") { if (currentTurnPlayer == "White") {
setLabelText("Black Turn"); setLabelText("Black Turn");
currentTurnPlayer = "Black"; currentTurnPlayer = "Black";
@@ -286,7 +290,9 @@ public class Game {
else { else {
currentTurnPlayer = "White"; currentTurnPlayer = "White";
setLabelText("White Turn"); setLabelText("White Turn");
} // end of if-else }
}
} }