settings_menu: Create a dedicated class for the settings

This commit is contained in:
2026-01-12 21:34:41 +01:00
parent 24d8a092e4
commit 416d3a2be9
13 changed files with 286 additions and 161 deletions

View File

@@ -2,7 +2,7 @@
* File name: rules.cpp
* Author: lejulien
* Date created: 10-01-2026 21:49:14
// Date modified: 10-01-2026 22:00:16
// Date modified: 12-01-2026 21:59:00
* ------
*/
@@ -67,13 +67,13 @@ void Rules::diag_neighbors(int &neighbors, int i, int j) {
// Member function
void Rules::setup(World *world) {
void Rules::setup(std::shared_ptr<World> world) {
_world = world;
_width = world->getWidth();
_height = world->getHeight();
}
void Rules::newWorld(World *world) {
void Rules::newWorld(std::shared_ptr<World> world) {
_world = world;
_width = world->getWidth();
_height = world->getHeight();