refactor: renamed snake to element and moved fruit to element. Removed a lot of unused functions and variables

This commit is contained in:
DarthMooMancer
2025-08-30 01:09:50 -04:00
parent d488f6464a
commit 96e5eb9930
15 changed files with 159 additions and 246 deletions
+2 -12
View File
@@ -2,22 +2,12 @@
#define WINDOW_HPP
#include <array>
#include "globals.hpp"
#include "fruit.hpp"
#include "snake.hpp"
#include "element.hpp"
struct Window {
Window();
std::array<std::array<char, COL>, ROW> m_board;
int m_score;
int m_reset;
int m_previous_reset;
void draw_window();
void tick(double frames_per_second);
void kill(bool &running);
void update_score(Fruit &fruit, Body &body);
void update_display(int fps);
void check_exit(bool &running, Body &body, bool &collision);
void update_display(Fruit &fruit, Head &head, Body &body);
};
#endif // WINDOW_HPP