Creepy-simulation
 
Loading...
Searching...
No Matches
StevesManager.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4#include <vector>
5
6#include "Steve.hpp"
7
8class Simulation;
17 std::shared_ptr<StevesParams> params_;
18 std::vector<std::shared_ptr<Steve>> steves_;
19
20 protected:
25 [[nodiscard]] decltype(steves_)& getStevesRef() { return steves_; }
26
27 public:
32 StevesManager(std::shared_ptr<StevesParams> params);
37 [[nodiscard]] const decltype(steves_)& getSteves() const { return steves_; }
41 void walk();
42
43 friend class Simulation;
44};
Main controller for managing the simulation of creepers and Steves.
Definition Simulation.hpp:16
Менеджер для управления сущностями типа Steve.
Definition StevesManager.hpp:16
decltype(steves_) & getStevesRef()
Получает ссылку на коллекцию объектов Steve.
Definition StevesManager.hpp:25
const decltype(steves_) & getSteves() const
Возвращает константную ссылку на коллекцию объектов Steve.
Definition StevesManager.hpp:37
void walk()
Выполняет действие перемещения для всех объектов Steve.
Definition StevesManager.cpp:12