diff --git a/GridIterator.java b/GridIterator.java index 19fc9e0f9169cd236e9195989a90ecdf71e3a91c..36504d2e265a372442fc10080e07119cb3e887b2 100644 --- a/GridIterator.java +++ b/GridIterator.java @@ -1,6 +1,6 @@ import java.util.Iterator; -/** + /** * {@link GridIterator} instances are used to iterate over the cells of a grid. */ public class GridIterator implements Iterator<Cell> { @@ -8,11 +8,12 @@ public class GridIterator implements Iterator<Cell> { private int columnIndex; private Grid grid; + GridIterator(Grid grid) { this.rowIndex = 0; this.columnIndex = 0; - this.grid = grid; - } + this.grid = grid; } + @Override public boolean hasNext() {