diff --git a/Grid.java b/Grid.java index d2d90e3ec55deaddab7e353c94fecc0ab468e662..7972a9b16df455ebd76a7d332c52efacb0085462 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(); + } } /**