fix: (tail) fixed where tail index 0 is on top of the head

This commit is contained in:
DarthMooMancer
2025-08-28 20:14:35 -04:00
parent ac23c873c3
commit 157933c122
9 changed files with 86 additions and 84 deletions
+13 -9
View File
@@ -2,18 +2,22 @@
#define WINDOW_HPP
#include <array>
#include "globals.hpp"
#include "fruit.hpp"
#include "snake.hpp"
struct Window {
std::array<std::array<char, COL>, ROW> m_board;
int m_score;
// Initializes board with . for each value
Window();
Window();
std::array<std::array<char, COL>, ROW> m_board;
int m_score;
int m_reset;
int m_previous_reset;
void draw_score();
void draw_window();
void clear_window();
void tick(double frames_per_second);
void update_loop(int fps);
void draw_score();
void draw_window();
void clear_window();
void tick(double frames_per_second);
void update_score(Fruit &fruit, Body &body);
void update_loop(int fps);
};
#endif // WINDOW_HPP