From 78c966ef9c0a3451aecb4abcc48f9e0944757990 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Mon, 14 Jun 2021 16:01:19 +0300 Subject: fix: generate moves for black correctly --- src/pieces.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pieces.h') diff --git a/src/pieces.h b/src/pieces.h index 9821695..2289f2c 100644 --- a/src/pieces.h +++ b/src/pieces.h @@ -1,5 +1,7 @@ #define WHITE 0b0000 #define BLACK 0b0001 +#define NO_COLOR 0b1110 + #define EMPTY 0b0000 #define VISUAL 0b0001 @@ -28,6 +30,7 @@ int queenMoves[] = { 17, 16, 15, 1, -1, -15, -16, -17, 0 }; int knightMoves[] = { 33, 31, 18, 14, -33, -31, -18, -14, 0 }; int kingMoves[] = { 17, 16, 15, 1, -1, -15, -16, -17, 0 }; int pawnMoves[] = { 17, 16, 15, 0 }; +int blackPawnMoves[] = { -17, -16, -15, 0 }; #define FILE_MASK 0b1111 -- cgit v1.2.3