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