aboutsummaryrefslogtreecommitdiff
path: root/src/board.h
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-03-31 22:41:21 +0300
committereug-vs <eugene@eug-vs.xyz>2022-03-31 22:45:19 +0300
commit7dbd21f32c633e6c0c7fe9c55accda3bfc9fc88c (patch)
tree933a2df571f4cd782dd40baffcf55d733d590e42 /src/board.h
parent01d7e24b2c32d9350a11afa0e9ef677790c460d6 (diff)
downloadcarcassonne-engine-c-7dbd21f32c633e6c0c7fe9c55accda3bfc9fc88c.tar.gz
refactor: remove unused code
Diffstat (limited to 'src/board.h')
-rw-r--r--src/board.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/board.h b/src/board.h
index dc1995a..e0acd1f 100644
--- a/src/board.h
+++ b/src/board.h
@@ -3,15 +3,9 @@
#define BOARD_UNITS BOARD_ROW_UNITS * BOARD_ROW_UNITS
-char EMPTY = ' ';
-
-int neighbor_increments[] = {
- - BOARD_ROW_UNITS,
- 1,
- BOARD_ROW_UNITS,
- - 1
-};
-
+/* constants */
+const char EMPTY = ' ';
+const int NEIGHBOR_INCREMENTS[] = { -BOARD_ROW_UNITS, 1, BOARD_ROW_UNITS, -1 };
/* structs */
typedef struct {
@@ -28,14 +22,11 @@ typedef struct {
/* board */
void initialize_board(BoardUnit* board);
-void print_board(BoardUnit* board);
-void write_board(BoardUnit* board, char* filename);
-void read_board(BoardUnit* board, char* filename);
-
-/* moves */
-int is_allowed_placement(Tile tile, int index, BoardUnit* board);
int translate_coordinate(int index);
int is_center_index(int index);
+
+/* tiles */
+int is_allowed_placement(Tile tile, int index, BoardUnit* board);
int place_tile(Tile tile, int index, BoardUnit* board, int force);
/* structures */