removing magic numbers

This commit is contained in:
DarthMooMancer
2025-11-02 21:46:24 -05:00
parent 02ff154b81
commit ab16f18137
5 changed files with 25 additions and 37 deletions
+1 -3
View File
@@ -4,7 +4,6 @@
#include "globals.hpp"
enum Direction {
NONE = 0,
UP = -2,
DOWN = 2,
LEFT = -1,
@@ -12,8 +11,7 @@ enum Direction {
};
struct Point {
int m_row;
int m_col;
int m_row, m_col;
char m_symbol;
enum Direction m_dir;
Point() : m_row(0), m_col(0), m_symbol('@') {}
+4
View File
@@ -2,4 +2,8 @@
#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
#endif // GLOBALS_HPP