Set ball reset position to middle of window

This commit is contained in:
Pradana AUMARS 2021-06-28 13:02:50 +02:00
parent 145fbfd02e
commit 0d522fb521

View File

@ -16,8 +16,8 @@ Ball_init(int screen_width, int screen_height)
void
Ball_reset(Ball *b, int direction) {
b->posX = 100;
b->posY = 100;
b->posX = b->SCREEN_WIDTH/2;
b->posY = b->SCREEN_HEIGHT/2;
b->velX = direction * 7;
b->velY = 5;
}