#pragma once #include #include #define BOARD_WIDTH 4 #define BOARD_HEIGHT 4 #define STARTING_TILES 3 typedef enum { UP, DOWN, LEFT, RIGHT } move_direction_t; typedef enum { PLAYING, WON, LOST } game_status_t; typedef struct { unsigned int board[BOARD_HEIGHT][BOARD_WIDTH]; game_status_t status; unsigned int score; unsigned int moves_made; } GameState_t; void move(GameState_t *state, move_direction_t direction); void reset_board(GameState_t *state); bool spawn_tile(GameState_t *state); bool can_move(GameState_t *state);