I broke line checking btw
This commit is contained in:
+8
-18
@@ -1,21 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
#ifndef ENGINE_HPP
|
||||
#define ENGINE_HPP
|
||||
#include <ncurses.h>
|
||||
|
||||
class Engine {
|
||||
public:
|
||||
Engine();
|
||||
~Engine() { endwin(); }
|
||||
void run();
|
||||
extern char buf[9];
|
||||
|
||||
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();
|
||||
};
|
||||
void run();
|
||||
bool check_line(char id);
|
||||
bool update_status();
|
||||
bool process_input();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user