win and lose label
This commit is contained in:
10
Game.java
10
Game.java
@@ -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,9 +276,13 @@ public class Game {
|
||||
|
||||
}
|
||||
else {
|
||||
if (game_state != 4) {
|
||||
game_state = 0;
|
||||
} // end of if
|
||||
|
||||
}
|
||||
|
||||
if(game_state != 4) {
|
||||
if (currentTurnPlayer == "White") {
|
||||
setLabelText("Black Turn");
|
||||
currentTurnPlayer = "Black";
|
||||
@@ -286,7 +290,9 @@ public class Game {
|
||||
else {
|
||||
currentTurnPlayer = "White";
|
||||
setLabelText("White Turn");
|
||||
} // end of if-else
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user