diff options
author | eug-vs <eug-vs@keemail.me> | 2021-06-14 16:33:59 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-06-14 16:33:59 +0300 |
commit | 50ffb304f0d4098ccbcc7e2fb286b2d3cc56e66c (patch) | |
tree | 166dade91166cbe1463393d956c710b55298ae66 /src/pieces.h | |
parent | 78c966ef9c0a3451aecb4abcc48f9e0944757990 (diff) | |
download | c-chess-50ffb304f0d4098ccbcc7e2fb286b2d3cc56e66c.tar.gz |
feat: pass turn between players and validate moves
Diffstat (limited to 'src/pieces.h')
-rw-r--r-- | src/pieces.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pieces.h b/src/pieces.h index 2289f2c..5689bb7 100644 --- a/src/pieces.h +++ b/src/pieces.h @@ -2,6 +2,8 @@ #define BLACK 0b0001 #define NO_COLOR 0b1110 +char* COLORS[] = { "white", "black" }; + #define EMPTY 0b0000 #define VISUAL 0b0001 @@ -29,8 +31,8 @@ int rookMoves[] = { 16, 1, -1, -16, 0 }; 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 }; +int pawnMoves[] = { 32, 17, 16, 15, 0 }; +int blackPawnMoves[] = { -32, -17, -16, -15, 0 }; #define FILE_MASK 0b1111 |