CMAKE changes
This commit is contained in:
+3
-2
@@ -1,6 +1,7 @@
|
||||
#ifndef ELEMENT_HPP
|
||||
#define ELEMENT_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include "globals.hpp"
|
||||
|
||||
@@ -25,11 +26,11 @@ public:
|
||||
void run();
|
||||
|
||||
private:
|
||||
Window* win;
|
||||
std::vector<Vector2i> buf;
|
||||
bool running = true;
|
||||
enum Direction m_dir;
|
||||
int m_score = 0;
|
||||
Window* win;
|
||||
uint8_t m_score = 0;
|
||||
void process_input();
|
||||
void determine_index_zero_pos();
|
||||
void move_tail_indicies();
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
#ifndef GLOBALS_HPP
|
||||
#define GLOBALS_HPP
|
||||
#define ROW 11
|
||||
#define COL 11
|
||||
#define MAX_LEN (ROW * COL) + 3
|
||||
#define HEAD 0
|
||||
#define PREVIOUS_HEAD 1
|
||||
#define FRUIT 2
|
||||
constexpr int ROW = 11;
|
||||
constexpr int COL = 11;
|
||||
constexpr int MAX_LEN = (ROW * COL) + 3;
|
||||
constexpr int HEAD = 0;
|
||||
constexpr int PREVIOUS_HEAD = 1;
|
||||
constexpr int FRUIT = 2;
|
||||
#endif // GLOBALS_HPP
|
||||
|
||||
Reference in New Issue
Block a user