Creepy-simulation
 
Loading...
Searching...
No Matches
Simulation Class Reference

Main controller for managing the simulation of creepers and Steves. More...

#include <Simulation.hpp>

Public Member Functions

 Simulation (const std::shared_ptr< FieldParams > &fieldParams, const std::shared_ptr< CreepersParams > &creepersParams, const std::shared_ptr< StevesParams > &stevesParams)
 Constructs a Simulation object.
 
void updateField ()
 Updates the simulation field.
 
CreepersManagergetCreepersManager ()
 Provides access to the CreepersManager.
 
StevesManagergetStevesManager ()
 Provides access to the StevesManager.
 
SimulationsetBedrock (const Rectangle &bedrock)
 Configures bedrock for the simulation field.
 
SimulationdeleteBedrock (const Rectangle &bedrock)
 

Detailed Description

Main controller for managing the simulation of creepers and Steves.

The Simulation class coordinates the field, creepers, and Steves, handling updates, interactions, and field configuration.

Constructor & Destructor Documentation

◆ Simulation()

Simulation::Simulation ( const std::shared_ptr< FieldParams > &  fieldParams,
const std::shared_ptr< CreepersParams > &  creepersParams,
const std::shared_ptr< StevesParams > &  stevesParams 
)

Constructs a Simulation object.

Parameters
fieldParamsShared pointer to the field parameters.
creepersParamsShared pointer to creeper parameters.
stevesParamsShared pointer to Steve parameters.

Member Function Documentation

◆ deleteBedrock()

Simulation & Simulation::deleteBedrock ( const Rectangle bedrock)
inline

◆ getCreepersManager()

CreepersManager & Simulation::getCreepersManager ( )
inline

Provides access to the CreepersManager.

Returns
Reference to the CreepersManager.

◆ getStevesManager()

StevesManager & Simulation::getStevesManager ( )
inline

Provides access to the StevesManager.

Returns
Reference to the StevesManager.

◆ setBedrock()

Simulation & Simulation::setBedrock ( const Rectangle bedrock)
inline

Configures bedrock for the simulation field.

Parameters
bedrockRectangle representing the bedrock boundaries.
Returns
Reference to the Simulation object.

◆ updateField()

void Simulation::updateField ( )

Updates the simulation field.

This method manages the interactions and updates between creepers and Steves.


The documentation for this class was generated from the following files: