#ifndef _FD_GAME_
#define _FD_GAME_

#include <stdbool.h>

typedef struct Game Game;

typedef enum CommandType {
  COMMAND_LOOK,
  COMMAND_QUIT,
  COMMAND_UNKNOWN,
  COMMAND_NORTH,
  COMMAND_SOUTH,
  COMMAND_EAST,
  COMMAND_WEST,
} CommandType;

#include "input.h"
#include "room.h"
#include "room_in.h"
#include "log.h"
#include "word.h"
#include "flag.h"
#include "action.h"
#include "item.h"

struct Game {
  bool should_close;
  Input *input;
  Log *log;
  Rooms *rooms;
  RoomIns *room_ins;
  Room *current_room;
  Words *words;
  Flags *flags;
  Actions *actions;
  Items *items;
};

Game *game_create(void);
CommandType command_from_string(const char *string);
void game_handle_command(Game *g, const char *command);
void game_load_rooms(Game *g);
void game_run_until_close(Game *g);
void game_handle_input(Game *g);
void game_draw(Game *g);
void free_game(Game *g);
void change_current_room(Game *g, Room *r);

#endif