settings_menu: Create a dedicated class for the settings
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* File name: world.cpp
|
||||
* Author: lejulien
|
||||
* Date created: 09-01-2026 23:59:55
|
||||
// Date modified: 10-01-2026 22:00:23
|
||||
// Date modified: 12-01-2026 22:14:46
|
||||
* ------
|
||||
*/
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
// Constructor and destructor
|
||||
|
||||
World::World(gol::ctx &context) {
|
||||
_width = context.config_json["screen_width"].get<int>() /
|
||||
context.config_json["cell_size"].get<int>();
|
||||
_height = context.config_json["screen_height"].get<int>() /
|
||||
context.config_json["cell_size"].get<int>();
|
||||
World::World(std::shared_ptr<gol::ctx> context) {
|
||||
_width = context->config_json["screen_width"].get<int>() /
|
||||
context->config_json["cell_size"].get<int>();
|
||||
_height = context->config_json["screen_height"].get<int>() /
|
||||
context->config_json["cell_size"].get<int>();
|
||||
// create world data
|
||||
this->_data = new std::vector<bool>(_width * _height, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user