diff options
author | eug-vs <eug-vs@keemail.me> | 2021-06-14 15:55:02 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-06-14 15:55:02 +0300 |
commit | ee434da2fcd7873633d076790dd4689e81524fe5 (patch) | |
tree | 8b0c03bf797e0a837312cc0759f47de94896f04d /src/pieces.h | |
parent | 82851b83ff9c0b8dd0251636814995c8603a381a (diff) | |
download | c-chess-ee434da2fcd7873633d076790dd4689e81524fe5.tar.gz |
feat: generate legal moves
Diffstat (limited to 'src/pieces.h')
-rw-r--r-- | src/pieces.h | 8 |
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 |