summaryrefslogtreecommitdiff
path: root/src/pieces.h
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-06-14 15:55:02 +0300
committereug-vs <eug-vs@keemail.me>2021-06-14 15:55:02 +0300
commitee434da2fcd7873633d076790dd4689e81524fe5 (patch)
tree8b0c03bf797e0a837312cc0759f47de94896f04d /src/pieces.h
parent82851b83ff9c0b8dd0251636814995c8603a381a (diff)
downloadc-chess-ee434da2fcd7873633d076790dd4689e81524fe5.tar.gz
feat: generate legal moves
Diffstat (limited to 'src/pieces.h')
-rw-r--r--src/pieces.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pieces.h b/src/pieces.h
index 2d5a02a..9821695 100644
--- a/src/pieces.h
+++ b/src/pieces.h
@@ -13,7 +13,7 @@
char* pieces[] = {
- ".", "#",
+ ".", "*",
"♟︎", "♙",
"♞", "♘",
"♝", "♗",
@@ -22,6 +22,12 @@ char* pieces[] = {
"♚", "♔",
};
+int bishopMoves[] = { 17, 15, -17, -15, 0 };
+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 };
#define FILE_MASK 0b1111