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