21 lines
592 B
C
21 lines
592 B
C
#include "simulation_world.h"
|
|
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
|
|
Simulation_World simulation_create_world(uint32_t seed, uint8_t max_players, uint16_t width, uint16_t height) {
|
|
Simulation_World w;
|
|
memset(&w, 0, sizeof(Simulation_World));
|
|
|
|
w.game_world = game_world_create(seed, width, height);
|
|
assert(w.game_world != NULL);
|
|
|
|
return w;
|
|
}
|
|
|
|
void simulation_destroy_world(Simulation_World *simulation_world) {
|
|
assert(simulation_world != NULL);
|
|
|
|
game_world_destroy(simulation_world->game_world);
|
|
simulation_world->game_world = NULL;
|
|
} |