Beispiel #1
0
        /// <summary>
        /// Takes back (undo) the En-Passant capture move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void EnPassantUnExecute(Board board)
        {
            board.RemoveFromHistory();

            board.MovePiece(m_to, m_from);
            board.PlacePiece(m_beforeState.EnPassantTarget, m_capture);

            board.State = m_beforeState;
        }
Beispiel #2
0
        /// <summary>
        /// Takes back (undo) the move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        public virtual void UnExecute()
        {
            m_board.RemoveFromHistory();

            m_board.MovePiece(m_to, m_from);
            m_board.PlacePiece(m_to, m_capture);

            m_board.State = m_beforeState;
        }
Beispiel #3
0
        /// <summary>
        /// Takes back (undo) the move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void StandardUnExecute(Board board)
        {
            board.RemoveFromHistory();

            board.MovePiece(m_to, m_from);
            board.PlacePiece(m_to, m_capture);

            board.State = m_beforeState;
        }
Beispiel #4
0
        /// <summary>
        /// Takes back (undo) the castling move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void CastlingUnExecute(Board board)
        {
            board.RemoveFromHistory();

            //Undoing rooks move
            board.MovePiece(m_rookTo, m_rookFrom);

            //Undoing kings move
            board.MovePiece(m_to, m_from);

            board.State = m_beforeState;
        }
Beispiel #5
0
        /// <summary>
        /// Takes back (undo) the move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void StandardUnExecute(Board board)
        {
            board.RemoveFromHistory();

              board.MovePiece(m_to, m_from);
              board.PlacePiece(m_to, m_capture);

              board.State = m_beforeState;
        }
Beispiel #6
0
        /// <summary>
        /// Takes back (undo) the En-Passant capture move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void EnPassantUnExecute(Board board)
        {
            board.RemoveFromHistory();

              board.MovePiece(m_to, m_from);
              board.PlacePiece(m_beforeState.EnPassantTarget, m_capture);

              board.State = m_beforeState;
        }
Beispiel #7
0
        /// <summary>
        /// Takes back (undo) the castling move. Nothing is done to verify if undoing the move is actually
        /// valid for the board associated to this move.
        /// </summary>
        private void CastlingUnExecute(Board board)
        {
            board.RemoveFromHistory();

              //Undoing rooks move
              board.MovePiece(m_rookTo, m_rookFrom);

              //Undoing kings move
              board.MovePiece(m_to, m_from);

              board.State = m_beforeState;
        }