]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Rename CASTLE to CASTLING
[stockfish] / src / types.h
index ff376386cac85dd6f3129bdbc5649f7945f8d3f8..cf0677799c6ea34b5bcf6271715ecd71bf90ca27 100644 (file)
@@ -97,7 +97,7 @@ const int MAX_PLY_PLUS_6 = MAX_PLY + 6;
 /// bit  0- 5: destination square (from 0 to 63)
 /// bit  6-11: origin square (from 0 to 63)
 /// bit 12-13: promotion piece type - 2 (from KNIGHT-2 to QUEEN-2)
 /// bit  0- 5: destination square (from 0 to 63)
 /// bit  6-11: origin square (from 0 to 63)
 /// bit 12-13: promotion piece type - 2 (from KNIGHT-2 to QUEEN-2)
-/// bit 14-15: special move flag: promotion (1), en passant (2), castle (3)
+/// bit 14-15: special move flag: promotion (1), en passant (2), castling (3)
 ///
 /// Special cases are MOVE_NONE and MOVE_NULL. We can sneak these in because in
 /// any normal move destination square is always different from origin square
 ///
 /// Special cases are MOVE_NONE and MOVE_NULL. We can sneak these in because in
 /// any normal move destination square is always different from origin square
@@ -112,17 +112,17 @@ enum MoveType {
   NORMAL,
   PROMOTION = 1 << 14,
   ENPASSANT = 2 << 14,
   NORMAL,
   PROMOTION = 1 << 14,
   ENPASSANT = 2 << 14,
-  CASTLE    = 3 << 14
+  CASTLING  = 3 << 14
 };
 
 };
 
-enum CastleRight {  // Defined as in PolyGlot book hash key
-  CASTLES_NONE,
+enum CastlingFlag {  // Defined as in PolyGlot book hash key
+  NO_CASTLING,
   WHITE_OO,
   WHITE_OOO   = WHITE_OO << 1,
   BLACK_OO    = WHITE_OO << 2,
   BLACK_OOO   = WHITE_OO << 3,
   WHITE_OO,
   WHITE_OOO   = WHITE_OO << 1,
   BLACK_OO    = WHITE_OO << 2,
   BLACK_OOO   = WHITE_OO << 3,
-  ALL_CASTLES = WHITE_OO | WHITE_OOO | BLACK_OO | BLACK_OOO,
-  CASTLE_RIGHT_NB = 16
+  ANY_CASTLING = WHITE_OO | WHITE_OOO | BLACK_OO | BLACK_OOO,
+  CASTLING_FLAG_NB = 16
 };
 
 enum CastlingSide {
 };
 
 enum CastlingSide {
@@ -346,8 +346,8 @@ inline Piece make_piece(Color c, PieceType pt) {
   return Piece((c << 3) | pt);
 }
 
   return Piece((c << 3) | pt);
 }
 
-inline CastleRight make_castle_right(Color c, CastlingSide s) {
-  return CastleRight(WHITE_OO << ((s == QUEEN_SIDE) + 2 * c));
+inline CastlingFlag make_castling_flag(Color c, CastlingSide s) {
+  return CastlingFlag(WHITE_OO << ((s == QUEEN_SIDE) + 2 * c));
 }
 
 inline PieceType type_of(Piece p)  {
 }
 
 inline PieceType type_of(Piece p)  {