예제 #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;
        }
예제 #2
0
파일: Move.cs 프로젝트: prezz/Firoz-Chess
        /// <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;
        }
예제 #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;
        }
예제 #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;
        }
예제 #5
0
파일: Move.cs 프로젝트: prezz/Firoz-Chess
        /// <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;
        }
예제 #6
0
파일: Move.cs 프로젝트: prezz/Firoz-Chess
        /// <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;
        }
예제 #7
0
파일: Move.cs 프로젝트: prezz/Firoz-Chess
        /// <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;
        }