fixed bug where the game exits before text is printed

This commit is contained in:
DarthMooMancer
2025-11-06 20:27:14 -05:00
parent a22574ce6e
commit 9dc24d8cad
2 changed files with 31 additions and 25 deletions
+15 -15
View File
@@ -3,33 +3,33 @@
#include <memory>
class Window;
struct Player {
Player(char id) : id(id) {};
char id;
};
struct vec2 {
vec2(int x, int y) : x(x), y(y) {}
int x;
int y;
};
class Engine {
public:
Engine();
~Engine();
void run();
private:
std::unique_ptr<Window> win;
std::unique_ptr<class Window> win;
struct Player {
Player(char id) : id(id) {};
char id;
};
struct vec2 {
vec2(int x, int y) : x(x), y(y) {}
int x;
int y;
};
struct GameState {
Player player1;
Player player2;
Player *temp;
GameState() : player1('x'), player2('o'), temp { &player1 } {};
} state;
void get_current_player();
void set_player();
bool process_input();
bool exit_code();
bool check_line(char id);