fix: (tail) fixed where tail index 0 is on top of the head
This commit is contained in:
+13
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user