fuck this shit
This commit is contained in:
+11
-10
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "globals.hpp"
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
struct vec2;
|
||||
struct Paddle;
|
||||
@@ -20,8 +21,8 @@ enum Direction { LEFT, RIGHT, NONE };
|
||||
struct Window {
|
||||
char view[ROW][COL] = {};
|
||||
void clear_display();
|
||||
void draw_display(int fps);
|
||||
void update_board(Paddle paddle, Ball ball);
|
||||
void draw_display(int fps) const;
|
||||
void update_board(Paddle paddle, Ball ball, std::vector<Block>);
|
||||
};
|
||||
|
||||
struct vec2 {
|
||||
@@ -51,13 +52,12 @@ struct Paddle {
|
||||
void check_collision(Ball &ball);
|
||||
};
|
||||
|
||||
// struct Block {
|
||||
// Block();
|
||||
// Block(vec2 pos, char symbol);
|
||||
// ~Block();
|
||||
// std::array<vec2, 3> m_nodes = {};
|
||||
// bool check_collision(Ball &ball);
|
||||
// };
|
||||
struct Block {
|
||||
Block();
|
||||
Block(vec2 pos, char symbol);
|
||||
std::array<vec2, 3> m_nodes = {};
|
||||
bool check_collision(Ball &ball);
|
||||
};
|
||||
|
||||
class Engine {
|
||||
public:
|
||||
@@ -69,7 +69,8 @@ private:
|
||||
Window win;
|
||||
Paddle paddle;
|
||||
Ball ball;
|
||||
std::vector<Block> block_buffer;
|
||||
bool process_input();
|
||||
bool quit_if();
|
||||
|
||||
void create_block_buffer(int starting_symbol, int rows, int cols, int length);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user