From 55dbb8e6ff50e230987c6319e10ef74bce17f17f Mon Sep 17 00:00:00 2001
From: belkhiritaha <belkhiri.taha53@gmail.com>
Date: Thu, 30 Jun 2022 13:59:45 +0200
Subject: [PATCH] fix des spawns de la balle

---
 travail_de_groupe/jeu_appren_par_renfo/src/ball.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/travail_de_groupe/jeu_appren_par_renfo/src/ball.c b/travail_de_groupe/jeu_appren_par_renfo/src/ball.c
index 7265fef..11d96b4 100644
--- a/travail_de_groupe/jeu_appren_par_renfo/src/ball.c
+++ b/travail_de_groupe/jeu_appren_par_renfo/src/ball.c
@@ -5,8 +5,8 @@ int trajectoireAntoine[NUMBERPOINT_TRAJEC][2];
 
 void initBall()
 {
-    ball.x = (rand()%(MAP_WIDTH/2)) * BLOCK_SIZE;
-    ball.y = (rand()% (MAP_HEIGHT)) * BLOCK_SIZE;
+    ball.x = (rand()%(MAP_WIDTH/2)) * BLOCK_SIZE + BLOCK_SIZE;
+    ball.y = (rand()% (MAP_HEIGHT - 2)) * BLOCK_SIZE + BLOCK_SIZE;
     ball.z = player.h / BLOCK_SIZE;
     ball.h = 0.5 * BLOCK_SIZE;
     ball.w = 0.5 * BLOCK_SIZE;
-- 
GitLab