From 434a974f08ab29e9e1e269f77d8b10d8ba902487 Mon Sep 17 00:00:00 2001
From: arthur <c19222814>
Date: Tue, 6 Oct 2020 20:35:37 +0200
Subject: [PATCH] =?UTF-8?q?impl=C3=A9mentation=20de=20la=20m=C3=A9thode=20?=
 =?UTF-8?q?clear?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Grid.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Grid.java b/Grid.java
index d2d90e3..7972a9b 100644
--- a/Grid.java
+++ b/Grid.java
@@ -149,6 +149,10 @@ public class Grid implements Iterable<Cell> {
      * Sets all {@link Cell}s in this {@code Grid} as dead.
      */
     void clear() {
+        GridIterator iterator = new GridIterator(this);
+        while (iterator.hasNext()) {
+            iterator.next().setDead();
+        }
     }
 
     /**
-- 
GitLab