home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / ARASAN_S.ZIP / RMOVE.H < prev    next >
C/C++ Source or Header  |  1994-02-19  |  930b  |  49 lines

  1. // Copyright 1994 by Jon Dart.  All Rights Reserved.
  2.  
  3. #ifndef _RMOVE_H
  4. #define _RMOVE_H
  5.  
  6. #include "emove.h"
  7.  
  8. class ReversibleMove : public ExtendedMove
  9. {
  10.     // a move that can be "undone"
  11.     public:
  12.         
  13.         ReversibleMove();        
  14.         
  15.         ReversibleMove( const Board &ABoard, const Square start,
  16.             const Square dest, 
  17.                 const Piece::PieceType promotion = Piece::Invalid);
  18.                 
  19.     ReversibleMove( const Board &ABoard, const ExtendedMove &emove);
  20.     
  21.     ~ReversibleMove()
  22.     {
  23.     }
  24.     
  25.     unsigned long Old_HashCode() const
  26.     {
  27.        return old_hashcode;
  28.     }
  29.     
  30.     Board::CastleType Old_CastleStatus( const ColorType side) const
  31.     {
  32.        return old_castlestatus[side];
  33.     }
  34.     
  35.     const Square &Old_EnPassantSq( const ColorType side ) const
  36.     {
  37.         return old_enpassantsq[side];
  38.     }
  39.     
  40.     private:
  41.         
  42.     unsigned long old_hashcode;
  43.     Board::CastleType old_castlestatus[2];
  44.     Square old_enpassantsq[2];
  45. };
  46.  
  47. #endif
  48.  
  49.