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() {
// end of if
if (white_chips == 0 && black_chips == 0) {
if (white_chips == 0 && black_chips == 0 && game_state != 4) {
game_state = 1;
hideAllButtons();
if (current_selection != null) {
@@ -276,17 +276,23 @@ public class Game {
}
else {
game_state = 0;
if (game_state != 4) {
game_state = 0;
} // end of if
}
if (currentTurnPlayer == "White") {
setLabelText("Black Turn");
currentTurnPlayer = "Black";
}
else {
currentTurnPlayer = "White";
setLabelText("White Turn");
} // end of if-else
if(game_state != 4) {
if (currentTurnPlayer == "White") {
setLabelText("Black Turn");
currentTurnPlayer = "Black";
}
else {
currentTurnPlayer = "White";
setLabelText("White Turn");
}
}
}