c-pong/include/ball.h
2023-10-06 17:30:56 +02:00

22 lines
400 B
C

#ifndef BALL_H
#define BALL_H
#define BALL_WIDTH 15
#define BALL_SPEED 1000
struct ball
{
int x_location;
int y_location;
int width;
int speed;
float x_direction;
float y_direction;
};
struct ball* ball_init(int x_location, int y_location, int width, int speed);
struct game_data;
void ball_update(struct game_data* data, struct ball* ball, float dt);
#endif /* BALL_H */