wip
This commit is contained in:
@@ -19,7 +19,6 @@ struct vec2 {
|
|||||||
class Engine {
|
class Engine {
|
||||||
public:
|
public:
|
||||||
Engine();
|
Engine();
|
||||||
~Engine();
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
#ifndef GLOBALS_HPP
|
#ifndef GLOBALS_HPP
|
||||||
#define GLOBALS_HPP
|
#define GLOBALS_HPP
|
||||||
#define ROW 5
|
|
||||||
#define COL 5
|
constexpr int ROW = 5;
|
||||||
|
constexpr int COL = 5;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-4
@@ -15,16 +15,13 @@ Engine::Engine() {
|
|||||||
win = std::make_unique<Window>();
|
win = std::make_unique<Window>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Engine::~Engine() {
|
|
||||||
endwin();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Engine::run() {
|
void Engine::run() {
|
||||||
while (exit_code() && process_input()) {
|
while (exit_code() && process_input()) {
|
||||||
win->draw_display();
|
win->draw_display();
|
||||||
std::cout << "Current Player: " << state.temp->id << "\n";
|
std::cout << "Current Player: " << state.temp->id << "\n";
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds((int) (150))); // 1000 / fps; 200ms = 5fps
|
std::this_thread::sleep_for(std::chrono::milliseconds((int) (150))); // 1000 / fps; 200ms = 5fps
|
||||||
}
|
}
|
||||||
|
endwin();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Engine::exit_code() {
|
bool Engine::exit_code() {
|
||||||
|
|||||||
Reference in New Issue
Block a user