world: Use context at contruction to simplify it's call

This commit is contained in:
2026-01-12 15:44:04 +01:00
parent 95a7d6ea9a
commit c00c430382
4 changed files with 11 additions and 10 deletions

View File

@@ -101,11 +101,7 @@ int main(int ac, char **av) {
RenderTexture2D selectionTexture = LoadRenderTexture(200, 200);
// Initialize objects
context.world = std::make_shared<World>(
context.config_json["screen_width"].get<int>() /
context.config_json["cell_size"].get<int>(),
context.config_json["screen_height"].get<int>() /
context.config_json["cell_size"].get<int>());
context.world = std::make_shared<World>(context);
Rules rules = Rules();
Render render(context.config_json["cell_size"]);