From e7acefcc0a4f76218168117dd87af58e67714980 Mon Sep 17 00:00:00 2001
From: Dahmane Lynda <lynda.dahmane.etu@118p28.fil.univ-lille.fr>
Date: Wed, 14 Feb 2024 11:42:45 +0100
Subject: [PATCH] minesweep.py

---
 Tp5/minesweeper/minesweeper.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Tp5/minesweeper/minesweeper.py b/Tp5/minesweeper/minesweeper.py
index a2b33aa..8358867 100755
--- a/Tp5/minesweeper/minesweeper.py
+++ b/Tp5/minesweeper/minesweeper.py
@@ -138,12 +138,9 @@ class Minesweeper():
         4
         """
        
-        count=0
-        for x in range(game.width):
-            for y in range(game.height):
-                if game.get_cell(x,y).is_bomb:
-                    count+=1
-        return count
+        
+        return self.grid[x][y]
+            
             
 
     def _put_a_bomb_at(self, x: int, y: int):
-- 
GitLab