-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntime.hpp
44 lines (32 loc) · 925 Bytes
/
runtime.hpp
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by asuka on 13.03.2023.
//
# ifndef SNAKE_RUNTIME_HPP
# define SNAKE_RUNTIME_HPP
# include <glfw_system.hpp>
# include <window.hpp>
# include <game.hpp>
# include <renderer.hpp>
namespace snake {
class Runtime {
public:
Runtime() = default;
~Runtime() = default;
Runtime(const Runtime&) = delete;
Runtime& operator=(const Runtime&) = delete;
Runtime(Runtime&&) noexcept = delete;
Runtime& operator=(Runtime&&) noexcept = delete;
void run();
private:
const double upd_ = 6;
const double fps_ = 10;
const double upd_rate_ = 1. / upd_;
const double fps_rate_ = 1. / fps_;
GLFWSystem glfw_{};
Window window_{{{500, 500}, "Snake"}};
KeysInput keys_input_{window_};
Game game_{keys_input_};
Renderer renderer_{game_};
};
} // snake
# endif // SNAKE_RUNTIME_HPP