Exemplo n.º 1
0
 /**
  * End game method. Sets all spaces to not be clickable, resets the toolbar at the top of the
  * window, clears the stack, and resets the controller so its ready for a new game.
  */
 private void gameOver() {
   gui.resetBackgrounds();
   gui.resetToolbar();
   moveStack = new Stack<Move>();
   currentColor = WHITE;
   currentPiece = null;
 }
Exemplo n.º 2
0
 /** Toggles the current color, and sets the side to that color */
 public void switchSides() {
   // alternate color
   currentColor = 1 - currentColor;
   gui.resetBackgrounds();
   setCurrentSide(currentColor);
   evaluateBoard();
 }
Exemplo n.º 3
0
 /** Entry method for resetting the backgrounds and setting the current side */
 public void setBoard() {
   gui.resetBackgrounds();
   setCurrentSide(currentColor);
 }