Exemple #1
0
 public QueryEntry(Move queryMove, int queryScore)
 {
     QueryMove = queryMove;
     QueryScore = queryScore;
 }
 /// <summary>
 /// Initializes a new MoveFoundEventArgs.
 /// </summary>
 /// <param name="move">The move found by the engine it wants to play.</param>
 internal MoveFoundEventArgs(Move move)
 {
     m_move = move;
 }
Exemple #3
0
 /// <summary>
 /// Appends a move at the end of the MoveOrganizer.
 /// </summary>
 /// <param name="move">Move to add.</param>
 public void Add(Move move)
 {
     m_moves.Add(move);
 }
Exemple #4
0
        /// <summary>
        /// Makes a move.
        /// </summary>
        /// <param name="move">The move to perform.</param>
        public bool MakeMove(Move move)
        {
            if (move.Execute(m_board))
              {
            switch (m_board.State.ColorToPlay)
            {
              case PieceColor.White:
            m_clock.EndBlackTurn();
            break;

              case PieceColor.Black:
            m_clock.EndWhiteTurn();
            break;
            }

            m_undoMoveHistory.Push(move);
            m_redoMoveHistory.Clear();
            HandleGameHasChanged();

            switch (m_board.State.ColorToPlay)
            {
              case PieceColor.White:
            m_clock.BeginWhiteTurn();
            break;

              case PieceColor.Black:
            m_clock.BeginBlackTurn();
            break;
            }

            return true;
              }

              return false;
        }
Exemple #5
0
 /// <summary>
 /// Appends a move at the end of the MoveOrganizer.
 /// </summary>
 /// <param name="move">Move to add.</param>
 public void Add(Move move)
 {
     if (m_pvMove.From == move.From && m_pvMove.To == move.To && m_pvMove.PromotionPiece == move.PromoteTo)
     m_moves[0] = move;
       else
     m_moves.Add(move);
 }