Files
tic_tac_toe/include/engine.hpp
T
2025-11-24 00:31:52 -05:00

22 lines
354 B
C++

#pragma once
#include <array>
#include <string>
#include <ncurses.h>
class Engine {
public:
Engine();
~Engine() { endwin(); }
void run();
private:
char p1 { 'x' }, p2 { 'o' }, temp { p1 };
std::string status;
std::array<char, 9> view;
void draw_display() const;
bool check_line(char id) const;
bool update_status();
bool process_input();
};