/** * 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; }
/** Toggles the current color, and sets the side to that color */ public void switchSides() { // alternate color currentColor = 1 - currentColor; gui.resetBackgrounds(); setCurrentSide(currentColor); evaluateBoard(); }
/** Entry method for resetting the backgrounds and setting the current side */ public void setBoard() { gui.resetBackgrounds(); setCurrentSide(currentColor); }