removing magic numbers
This commit is contained in:
+1
-3
@@ -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('@') {}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user