]> git.sesse.net Git - stockfish/blobdiff - src/direction.h
Space inflate book.cpp
[stockfish] / src / direction.h
index 4ca264a0291ae5ed59deb21a7170444fcadab32b..1890f1cff7035832c390f6fc626ef36c97ff4c96 100644 (file)
@@ -74,6 +74,13 @@ inline SignedDirection signed_direction_between_squares(Square s1, Square s2) {
   return SignedDirection(SignedDirectionTable[s1][s2]);
 }
 
+inline int direction_is_diagonal(Square s1, Square s2) {
+  return DirectionTable[s1][s2] & 2;
+}
+
+inline bool direction_is_straight(Square s1, Square s2) {
+  return DirectionTable[s1][s2] < 2;
+}
 
 ////
 //// Prototypes