fuck this shit

This commit is contained in:
DarthMooMancer
2025-11-23 23:09:26 -05:00
parent d216202858
commit fbd412d9f1
4 changed files with 59 additions and 92 deletions
+11 -10
View File
@@ -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);
};