feat: added paddle, point and ball (collision and movement)

This commit is contained in:
DarthMooMancer
2025-09-01 03:07:46 -04:00
parent 6cb55e0e1a
commit 0fc5a08ab2
9 changed files with 132 additions and 23 deletions
+33
View File
@@ -0,0 +1,33 @@
#ifndef ELEMENTS_HPP
#define ELEMENTS_HPP
struct Point {
Point();
int m_row;
int m_col;
void assign(int row, int col);
void to_string();
};
struct Paddle {
Paddle();
int _size;
Point m_nodes[3];
void get_new_pos();
};
struct Ball {
Ball();
Point m_origin;
int vx;
int vy;
void get_new_pos();
void check_collision();
void change_velocity(char d);
};
// struct Block {
//
// };
//
#endif