コード例 #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();
        }