24 lines
449 B
C++
24 lines
449 B
C++
#ifndef WINDOW_HPP
|
|
#define WINDOW_HPP
|
|
#include <array>
|
|
#include "globals.hpp"
|
|
#include "fruit.hpp"
|
|
#include "snake.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_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
|