wip
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
#ifndef ELEMENTS_HPP
|
||||
#define ELEMENTS_HPP
|
||||
|
||||
struct Point;
|
||||
struct Paddle;
|
||||
struct Block;
|
||||
struct Ball;
|
||||
Paddle create_new_paddle(int size);
|
||||
|
||||
enum Direction {
|
||||
LEFT = -1,
|
||||
RIGHT = 1,
|
||||
NONE = 0,
|
||||
};
|
||||
|
||||
struct Point {
|
||||
Point();
|
||||
Point(int row, int col, char symbol) : m_row(row), m_col(col), m_symbol(symbol) {};
|
||||
int m_row;
|
||||
int m_col;
|
||||
char m_symbol;
|
||||
void assign(int row, int col);
|
||||
};
|
||||
|
||||
@@ -23,6 +37,7 @@ struct Paddle {
|
||||
Paddle();
|
||||
int _size;
|
||||
Point m_nodes[3];
|
||||
enum Direction m_direction;
|
||||
void get_new_pos();
|
||||
void check_collision(Ball &ball);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user