blob: 6d0251fddc8d70eb5b1177070067c67c68ac8966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include "interfaces/cursor.hpp"
#include "interfaces/input.hpp"
#include "interfaces/scene.hpp"
#include <yacppdic/factory.hpp>
#include <memory>
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IGame
{
public:
virtual ~IGame() noexcept = default;
virtual void on_start() = 0;
virtual void on_update() noexcept = 0;
virtual void on_exit() const noexcept = 0;
};
using IGameFactory = yacppdic::Factory<std::unique_ptr<IGame>(
const std::shared_ptr<IScene> &scene,
const std::shared_ptr<ICursorController> &cursor_controller,
const std::shared_ptr<IUserInputObserver> &user_input_observer)>;
|