From a22574ce6e93dd79652a25b169ba4b9ef0253fac Mon Sep 17 00:00:00 2001 From: DarthMooMancer Date: Thu, 6 Nov 2025 20:18:34 -0500 Subject: [PATCH] wip --- include/elements.hpp | 1 - include/globals.hpp | 5 +++-- src/elements.cpp | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/elements.hpp b/include/elements.hpp index af0301d..a5b6d6d 100644 --- a/include/elements.hpp +++ b/include/elements.hpp @@ -19,7 +19,6 @@ struct vec2 { class Engine { public: Engine(); - ~Engine(); void run(); private: diff --git a/include/globals.hpp b/include/globals.hpp index cecf868..8331941 100644 --- a/include/globals.hpp +++ b/include/globals.hpp @@ -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 diff --git a/src/elements.cpp b/src/elements.cpp index 1f597be..f7c28ed 100644 --- a/src/elements.cpp +++ b/src/elements.cpp @@ -15,16 +15,13 @@ Engine::Engine() { win = std::make_unique(); } -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() {