-
Печенин Данила Михайлович authored
Standard ComplexBuilder was implemented and previous ComplexBuilder -> ComplexRandomBuilder. Final was added to some classes.
01fa749e
#pragma once
#include <Configuration.h>
#include <BasicAbstractions/IState.h>
#include <BasicAbstractions/IWindowKeeper.h>
#include <States/GameState/Maze/Maze.h>
#include <States/GameState/Context/ContextManager.h>
class GameState final : public IState, public IWindowKeeper {
public:
explicit GameState(IStateManager& state_manager, const sf::VideoMode& video_mode, const sf::String& window_title) :
IState(state_manager), IWindowKeeper(video_mode, window_title) {
m_window.setFramerateLimit(config::FRAME_RATE_LIMIT);
}
bool do_step() override;
void set_maze(Maze&& maze) { m_maze = std::move(maze); }
void set_context(GameContext&& context) { m_context_manager.reset(std::move(context)); }
private:
void event_handling() override;
void update() override;
void render() override;
private:
Maze m_maze;
ContextManager m_context_manager;
};