5#ifndef CASSE_BRIQUE_BALL_H
6#define CASSE_BRIQUE_BALL_H
10#include <SDL2/SDL_timer.h>
33 Ball(
int x,
int y,
int radius,
const SDL_Color &color,
const std::string&
id);
42 void render(std::shared_ptr<SDL_Renderer> renderer, SDL_Color color1, SDL_Color color2)
override;
The Ball class represents a ball object in the game.
void move() override
Moves the ball according to its velocity.
void render(std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override
Renders the ball on the screen.
void handleCollision(point vect)
Handles collision with a single object.
void setVelocity(float dx, float dy)
Sets the velocity of the ball.
void handleCollisions(point collision) override
Handles collisions with other objects.
The MovingObject class represents a moving colliding object.
The point struct represents a point in 2D space.