Example #1
0
 /*
  * This method restores the previous state of the game
  */
 public void restoreFromMementos(MementoBoard mb, MementoImages mi)
 {
     whitePieces = mb.getWhitePieces();
     blackPieces = mb.getBlackPieces();
     mainForm.setWhiteImages(mi.getWhiteImages());
     mainForm.setBlackImages(mi.getBlackImages());
     redrawBoard();
     mainForm.paintDeletedWhitePieces();
     mainForm.paintDeletedBlackPieces();
     mainForm.shiftTurn();
     mainForm.removeFromLog();
 }
Example #2
0
        /*
         * This method restores the previous state of the game
         */
        public void restoreFromMementos(MementoBoard mb, MementoImages mi)
        {

            whitePieces = mb.getWhitePieces();
            blackPieces = mb.getBlackPieces();
            mainForm.setWhiteImages(mi.getWhiteImages());
            mainForm.setBlackImages(mi.getBlackImages());
            redrawBoard();
            mainForm.paintDeletedWhitePieces();
            mainForm.paintDeletedBlackPieces();
            mainForm.shiftTurn();
            mainForm.removeFromLog();
        }