4 #include "../math/vector2D.h" 15 Entity::Entity(
double x,
double y, pair<double, double> newSize) : position(x, y), size(newSize) {}
void setSize(pair< double, double > newSize)
Vector2D position
The current position of the Entity (in the 9x7 grid).
bool collidesWith(const Entity &other) const
Representation of a vector.
Vector2D getPosition() const
double y
The 'y' component of the Vector2D.
double x
The 'x' component of the Vector2D.
All the game logic of the Arkanoid game.
pair< double, double > getSize() const
An Entity represents an "object" (like Player, Ball, Block, ...) in the game World.
void setPosition(double x, double y)
pair< double, double > size
The size (width and height respectively) of the Entity.