From e5e6ae6aa64f493f1e4eaff2fe718da163076b51 Mon Sep 17 00:00:00 2001
From: "remi.greub" <remi.greub@hes-so.ch>
Date: Wed, 19 Mar 2025 21:06:33 +0100
Subject: [PATCH] =?UTF-8?q?ajout=20des=203=20bots,=20autres=20ajustements?=
 =?UTF-8?q?=20de=20fluidit=C3=A9=20de=20jeu?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 G3_TP1_labyrinth_etu/src/labyrinth.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/G3_TP1_labyrinth_etu/src/labyrinth.c b/G3_TP1_labyrinth_etu/src/labyrinth.c
index 3c614c7..4de4502 100644
--- a/G3_TP1_labyrinth_etu/src/labyrinth.c
+++ b/G3_TP1_labyrinth_etu/src/labyrinth.c
@@ -126,6 +126,12 @@ int main(void)
 	xTaskCreate(Algo_bots, (signed portCHAR *)"libreball1",
 						configMINIMAL_STACK_SIZE, &ball_param_th[2], tskIDLE_PRIORITY+1,
 						NULL);
+	xTaskCreate(Algo_bots, (signed portCHAR *)"libreball2",
+						configMINIMAL_STACK_SIZE, &ball_param_th[3], tskIDLE_PRIORITY+1,
+						NULL);
+	xTaskCreate(Algo_bots, (signed portCHAR *)"libreball3",
+						configMINIMAL_STACK_SIZE, &ball_param_th[4], tskIDLE_PRIORITY+1,
+						NULL);
 	vTaskStartScheduler();		// launch scheduler
 	LPC_TIM0->TCR = 1;
 
@@ -148,19 +154,19 @@ void Algo_main_ball(void *params){
 
 			if(CollisionState & TOUCH_LEFT){
 				un_ou_moins_un_x = -1;
-				ball->ball.pos.x += ball->ball.radius/2;
+				ball->ball.pos.x += ball->ball.radius/3;
 			}
 			if(CollisionState & TOUCH_RIGHT){
 				un_ou_moins_un_x = -1;
-				ball->ball.pos.x -= ball->ball.radius/2;
+				ball->ball.pos.x -= ball->ball.radius/3;
 			}
 			if(CollisionState & TOUCH_UP){
 				un_ou_moins_un_y = -1;
-				ball->ball.pos.y += ball->ball.radius/2;
+				ball->ball.pos.y += ball->ball.radius/3;
 			}
 			if(CollisionState & TOUCH_DOWN){
 				un_ou_moins_un_y = -1;
-				ball->ball.pos.y -= ball->ball.radius/2;
+				ball->ball.pos.y -= ball->ball.radius/3;
 			}
 		}else{
 			accel_read(&ball_acc);
-- 
GitLab