From cc2f6795ddd8ec708f3b342e68fe70486859ca7a Mon Sep 17 00:00:00 2001
From: antoinemeyer5 <antoine.meyer54@gmail.com>
Date: Wed, 22 Jun 2022 17:08:52 +0200
Subject: [PATCH] collisions avec water

---
 travail_de_groupe/chef_oeuvre/src/player.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/travail_de_groupe/chef_oeuvre/src/player.c b/travail_de_groupe/chef_oeuvre/src/player.c
index cc5135b..f4cb7bd 100644
--- a/travail_de_groupe/chef_oeuvre/src/player.c
+++ b/travail_de_groupe/chef_oeuvre/src/player.c
@@ -32,7 +32,10 @@ int collisionsLeftPlayer(){
     if(dotTopLeft==1 || dotDownLeft==1){
         collision = 1;
     }
-
+    //collision water
+    if(dotTopLeft==2 || dotDownLeft==2){
+        collision = 1;
+    }
     return collision;
 }
 
@@ -48,6 +51,10 @@ int collisionsRightPlayer(){
     if(dotTopRight==1 || dotDownRight==1){
         collision = 1;
     }
+    //collision water
+    if(dotTopRight==2 || dotDownRight==2){
+        collision = 1;
+    }
     return collision;
 }
 
@@ -63,6 +70,10 @@ int collisionsUpPlayer(){
     if(dotTopRight==1 || dotTopLeft==1){
         collision = 1;
     }
+    //collision water
+    if(dotTopRight==2 || dotTopLeft==2){
+        collision = 1;
+    }
     return collision;
 }
 
@@ -78,6 +89,10 @@ int collisionsDownPlayer(){
     if(dotDownRight==1 || dotDownLeft==1){
         collision = 1;
     }
+    //collision water
+    if(dotDownRight==2 || dotDownLeft==2){
+        collision = 1;
+    }
     return collision;
 }
 
-- 
GitLab