Score is now aligned in middle of the racket

This commit is contained in:
Pradana AUMARS 2021-06-29 01:26:33 +02:00
parent c8bd082866
commit b9df2a3cf0

View File

@ -8,7 +8,7 @@ Racket_init(int screen_width, int screen_height, int posX, int posY, SDL_Keycode
*(int *)&r->SCREEN_HEIGHT = screen_height;
*(int *)&r->posX = posX;
r->posY = posY;
r->score = Score_init(r->posX, RACKET_WIDTH);
r->score = Score_init(r->posX - SCORE_WIDTH/2 + RACKET_WIDTH/2, RACKET_WIDTH);
if (r->score == NULL) {
free(r);
return NULL;