diff --git a/src/chess.c b/src/chess.c new file mode 100644 index 0000000..e80738d --- /dev/null +++ b/src/chess.c @@ -0,0 +1,8 @@ +#include "chess.h" +#include + +int board[BOARD_VERTICAL][BOARD_HORIZONTAL]; + +bool init_board() { + +} \ No newline at end of file diff --git a/src/chess.h b/src/chess.h new file mode 100644 index 0000000..ab1cbd4 --- /dev/null +++ b/src/chess.h @@ -0,0 +1,34 @@ +#ifndef CHESS_H +#define CHESS_H + +/* the "board" is the playable area on which + * pieces move. pieces are represented by numbers: + * 0 - no piece + * 1 - pawn + * 2 - rook + * 3 - knight + * 4 - bishop + * 5 - queen + * 6 - king +*/ + +#define BOARD_HORIZONTAL 8 +#define BOARD_VERTICAL 8 +//int board[BOARD_VERTICAL][BOARD_HORIZONTAL]; + +// the default arrangment of pieces on the board +#define BOARD_DEFAULT_CONFIG \ +{\ + {2,3,4,5,6,4,3,2}\ + {1,1,1,1,1,1,1,1}\ + {0,0,0,0,0,0,0,0}\ + {0,0,0,0,0,0,0,0}\ + {0,0,0,0,0,0,0,0}\ + {1,1,1,1,1,1,1,1}\ + {2,3,4,5,6,4,3,2}\ +} + +// initializes the board with the default configuration of pieces +bool init_board(); + +#endif // CHESS_H \ No newline at end of file diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..1aa2989 --- /dev/null +++ b/src/util.h @@ -0,0 +1,4 @@ +#ifndef UTIL_H +#define UTIL_H + +#endif // UTIL_H \ No newline at end of file