Exemple #1
0
 public void CheckBotPawnUpper()
 {
     if (PlayerManager.currentPlayer == Piece.Party.white)
     {
         if (PlayerManager.whitePlayer == PlayerManager.PlayerType.Bot)
         {
             SomeProcess.PutPiece(ChoseComboBoxItemRandom());
             PawnUpperLaterProcess();
         }
         else
         {
             MessageBox.Show("Please,Chose a piece !");
         }
     }
     else
     {
         if (PlayerManager.blackPlayer == PlayerManager.PlayerType.Bot)
         {
             SomeProcess.PutPiece(ChoseComboBoxItemRandom());
             PawnUpperLaterProcess();
         }
         else
         {
             MessageBox.Show("Please,Chose a piece !");
         }
     }
 }
Exemple #2
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;
     }
 }
Exemple #3
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);
 }
Exemple #4
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     SomeProcess.PutPiece(comboBox1.SelectedItem.ToString());
     PawnUpperLaterProcess();
 }