// Copyright 1994 by Jon Dart.  All Rights Reserved.

#ifndef _RMOVE_H
#define _RMOVE_H

#include "emove.h"

class ReversibleMove : public ExtendedMove
{
	// a move that can be "undone"
	public:
		
        ReversibleMove();		
		
        ReversibleMove( const Board &ABoard, const Square start,
			const Square dest, 
		        const Piece::PieceType promotion = Piece::Invalid);
				
	ReversibleMove( const Board &ABoard, const ExtendedMove &emove);
	
        ReversibleMove( const Board &b, const Move &m);

	~ReversibleMove()
	{
	}
	
	hash_t Old_HashCode() const
	{
	   return old_hashcode;
	}
	
	hash_t Old_PawnHash() const
	{
	   return old_pawn_hashcode;
	}

	Board::CastleType Old_CastleStatus( const ColorType side) const
	{
	   return old_castlestatus[side];
	}
	
	const Square &Old_EnPassantSq( const ColorType side ) const
	{
	    return old_enpassantsq[side];
	}
        
        Board::CheckStatusType Old_CheckStatus() const
        {
            return old_checkStatus;
        }
        
        int Old_MoveCount() const
        {
            return old_movecount;
        }
	
	private:
		
	hash_t old_hashcode, old_pawn_hashcode;
        int old_movecount;
	Board::CastleType old_castlestatus[2];
	Square old_enpassantsq[2];
        Board::CheckStatusType old_checkStatus;
};

#endif

