c-pong/include/ball.h

22 lines
400 B
C
Raw Permalink Normal View History

2023-10-06 15:30:56 +00:00
#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 */