This commit is contained in:
DarthMooMancer
2025-11-06 20:18:34 -05:00
parent ee6f003d31
commit a22574ce6e
3 changed files with 4 additions and 7 deletions
-1
View File
@@ -19,7 +19,6 @@ struct vec2 {
class Engine { class Engine {
public: public:
Engine(); Engine();
~Engine();
void run(); void run();
private: private:
+3 -2
View File
@@ -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
View File
@@ -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() {