#ifndef WORLD_H
#define WORLD_H

#include <stdint.h>
#include "entity.h"
#include "grid.h"
#include "shared/squeue.h"

typedef struct {
    uint32_t seed;
    
    SQueue entity_id_queue;
    Entity *entities;
    uint16_t max_entities;

    Grid grid;

} Game_World;

Game_World *game_world_create(uint32_t seed, uint16_t level_width, uint16_t level_height);
void game_world_destroy(Game_World *world);

bool game_world_create_entity(Game_World *world, Entity_Type type, uint16_t x, uint16_t y, Entity_ID *out_entity_id);
void game_world_destroy_entity(Game_World *world, Entity_ID entity_id);

Entity *game_world_try_get_entity_by_id(Game_World *world, Entity_ID id);

#endif