예제 #1
0
파일: Board.cs 프로젝트: mariocervera/Chess
 /*
  * 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();
 }
예제 #2
0
파일: Board.cs 프로젝트: mariocervera/Chess
        /*
         * 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();
        }