refactor: removing some deprecated functions and removed array for c style array

This commit is contained in:
DarthMooMancer
2025-09-12 20:31:42 -04:00
parent cfa0e52705
commit 4bab69a3a8
9 changed files with 33 additions and 58 deletions
+13 -2
View File
@@ -2,7 +2,18 @@
#define ELEMENT_HPP
#include <vector>
#include "point.hpp"
#include "globals.hpp"
struct Point {
int m_row;
int m_col;
int m_direction;
Point() {}
Point(int x, int y) : m_row(x), m_col(y) {}
Point(int x, int y, int dir) : m_row(x), m_col(y), m_direction(dir) {}
void set_new_point(int row, int col, int dir);
};
struct Head {
Head();
@@ -29,7 +40,7 @@ struct Body {
struct Fruit {
Fruit();
Point m_point;
void get_new_pos(std::array<std::array<char, COL>, ROW> &board, Head &head, int &score);
void get_new_pos(char (&board)[ROW][COL], Head &head, int &score);
};
#endif // ELEMENT_HPP