Skip to content

Commit

Permalink
renamed GState to GameState
Browse files Browse the repository at this point in the history
  • Loading branch information
Judro committed Nov 20, 2024
1 parent abb06a6 commit b11f0a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef struct Game {
int flagstotal;
int flagsfound;
int unveiled;
GState state;
GameState state;
time_t started;
Cord cord;
} *GameInstance;
Expand Down Expand Up @@ -242,7 +242,7 @@ void deleteView(GameView view) {
free(view);
}

GState g_state(GameInstance game) { return game->state; }
GameState g_state(GameInstance game) { return game->state; }
Cord g_player_position(GameInstance g) { return g->cord; }
void g_set_player_position_x(GameInstance g, int x) { g->cord.x = x; }
void g_set_player_position_y(GameInstance g, int y) { g->cord.y = y; }
Expand Down
8 changes: 4 additions & 4 deletions src/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ typedef struct {

typedef struct Game *GameInstance;

typedef enum GState {
typedef enum GameState {
Playing,
Won,
Lost,
} GState;
} GameState;

typedef enum CellType {
UNTOUCHED,
Expand All @@ -36,12 +36,12 @@ typedef struct GameView {
Cord player;
unsigned width;
unsigned height;
GState state;
GameState state;
unsigned mines;
time_t time;
} *GameView;

GState g_state(GameInstance);
GameState g_state(GameInstance);
GameView createView(GameInstance);
GameView createViewGameover(GameInstance);
void deleteView(GameView);
Expand Down

0 comments on commit b11f0a7

Please sign in to comment.