wip
This commit is contained in:
+10
-11
@@ -1,21 +1,21 @@
|
||||
#ifndef ELEMENTS_HPP
|
||||
#define ELEMENTS_HPP
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
|
||||
constexpr int ROW = 5;
|
||||
constexpr int COL = 5;
|
||||
|
||||
struct Window {
|
||||
Window();
|
||||
std::array<std::array<char, COL>, ROW> view;
|
||||
void draw_display();
|
||||
struct vec2 {
|
||||
int x, y;
|
||||
vec2(int x, int y) : x(x), y(y) {}
|
||||
auto operator <=> (const vec2&) const = default;
|
||||
};
|
||||
|
||||
struct vec2 {
|
||||
vec2(int x, int y) : x(x), y(y) {}
|
||||
int x;
|
||||
int y;
|
||||
struct Window {
|
||||
Window();
|
||||
std::map<vec2, char> view;
|
||||
void draw_display();
|
||||
};
|
||||
|
||||
class Engine {
|
||||
@@ -25,13 +25,12 @@ public:
|
||||
void run();
|
||||
|
||||
private:
|
||||
Window win;
|
||||
|
||||
struct Player {
|
||||
Player(char id) : id(id) {};
|
||||
char id;
|
||||
};
|
||||
|
||||
Window win;
|
||||
Player player1 { 'x' };
|
||||
Player player2 { 'o' };
|
||||
Player *temp { &player1 };
|
||||
|
||||
Reference in New Issue
Block a user