Exemplo n.º 1
0
 private void modifyCurrentBoard(History history)
 {
     Board.board = SomeProcess.BoardCoppier(history.hisBoard);
     GameManager.doesGameFinish  = history.doesGameFinish;
     GameManager.gameIsGoing     = history.gameIsGoing;
     PlayerManager.currentPlayer = history.currentPlayer;
     if (upperPawnCoor != null)
     {
         GameManager.upperPawnCoor = new Coordinate(history.upperPawnCoor.GetCorX, history.upperPawnCoor.GetCorY);
     }
     else
     {
         GameManager.upperPawnCoor = null;
     }
 }
Exemplo n.º 2
0
 public History(Piece [,] board)
 {
     checkNext();
     historyCounter++;
     hisBoard       = SomeProcess.BoardCoppier(board);
     doesGameFinish = GameManager.doesGameFinish;
     gameIsGoing    = GameManager.gameIsGoing;
     currentPlayer  = PlayerManager.currentPlayer;
     if (GameManager.upperPawnCoor != null)
     {
         upperPawnCoor = new Coordinate(GameManager.upperPawnCoor.GetCorX, GameManager.upperPawnCoor.GetCorY);
     }
     else
     {
         upperPawnCoor = null;
     }
     rootHistory.Add(this);
 }