From 0d522fb5213305a221d5e1b6f4274c8f8e48a636 Mon Sep 17 00:00:00 2001 From: Pradana AUMARS Date: Mon, 28 Jun 2021 13:02:50 +0200 Subject: [PATCH] Set ball reset position to middle of window --- src/ball.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ball.c b/src/ball.c index 957b1d3..da6d7d5 100644 --- a/src/ball.c +++ b/src/ball.c @@ -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; }