]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Simplify away the PawnSet[] imbalance array (#1308)
[stockfish] / src / types.h
index 2709d77ffea70c3a39276bc62d45883c6f5d3be8..acca8743a487434341f44fe683a32938de067bee 100644 (file)
@@ -128,7 +128,7 @@ enum MoveType {
 };
 
 enum Color {
-  WHITE, BLACK, NO_COLOR, COLOR_NB = 2
+  WHITE, BLACK, COLOR_NB = 2
 };
 
 enum CastlingSide {
@@ -183,7 +183,7 @@ enum Value : int {
   VALUE_MATE_IN_MAX_PLY  =  VALUE_MATE - 2 * MAX_PLY,
   VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + 2 * MAX_PLY,
 
-  PawnValueMg   = 188,   PawnValueEg   = 248,
+  PawnValueMg   = 171,   PawnValueEg   = 240,
   KnightValueMg = 764,   KnightValueEg = 848,
   BishopValueMg = 826,   BishopValueEg = 891,
   RookValueMg   = 1282,  RookValueEg   = 1373,
@@ -421,6 +421,10 @@ inline Square to_sq(Move m) {
   return Square(m & 0x3F);
 }
 
+inline int from_to(Move m) {
+ return m & 0xFFF;
+}
+
 inline MoveType type_of(Move m) {
   return MoveType(m & (3 << 14));
 }