X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=1bf42bbe46337d5cd6c6c382a7647e58bc64c2db;hp=e5a7035c9b15ab47d2156bb52196d872aa8cccea;hb=7ae3c05795e79c9bd945607cdcfb08198f4c4b45;hpb=351844061eddffac59e7a3c2d16af7ea9661bb3e diff --git a/src/types.h b/src/types.h index e5a7035c..1bf42bbe 100644 --- a/src/types.h +++ b/src/types.h @@ -237,17 +237,15 @@ enum Square { SQUARE_NB = 64, - DELTA_N = 8, - DELTA_E = 1, - DELTA_S = -8, - DELTA_W = -1, - - DELTA_NN = DELTA_N + DELTA_N, - DELTA_NE = DELTA_N + DELTA_E, - DELTA_SE = DELTA_S + DELTA_E, - DELTA_SS = DELTA_S + DELTA_S, - DELTA_SW = DELTA_S + DELTA_W, - DELTA_NW = DELTA_N + DELTA_W + NORTH = 8, + EAST = 1, + SOUTH = -8, + WEST = -1, + + NORTH_EAST = NORTH + EAST, + SOUTH_EAST = SOUTH + EAST, + SOUTH_WEST = SOUTH + WEST, + NORTH_WEST = NORTH + WEST }; enum File { @@ -401,7 +399,7 @@ inline bool opposite_colors(Square s1, Square s2) { } inline Square pawn_push(Color c) { - return c == WHITE ? DELTA_N : DELTA_S; + return c == WHITE ? NORTH : SOUTH; } inline Square from_sq(Move m) {