Skip to content
Snippets Groups Projects
Commit 3162b523 authored by EL GAOUAL Zaid's avatar EL GAOUAL Zaid
Browse files

CellGridIterator

parent 0b764895
Branches
No related tags found
No related merge requests found
...@@ -3,9 +3,10 @@ package model; ...@@ -3,9 +3,10 @@ package model;
import java.util.Iterator; import java.util.Iterator;
public class CellGridIterator implements Iterator<Cell> { public class CellGridIterator implements Iterator<Cell> {
public CellGridIterator(ArrayGrid grid) { public ArrayGrid grid;
public CellGridIterator(ArrayGrid grid) {
this.grid=grid;
} }
@Override @Override
...@@ -15,7 +16,6 @@ public class CellGridIterator implements Iterator<Cell> { ...@@ -15,7 +16,6 @@ public class CellGridIterator implements Iterator<Cell> {
@Override @Override
public Cell next() { public Cell next() {
ArrayGrid grid = new ArrayGrid(grid.getNumberOfRows(), grid.getNumberOfColumns());
for(int i = 0; i < grid.getNumberOfRows() ; i++) { for(int i = 0; i < grid.getNumberOfRows() ; i++) {
for(int j = 0; j < grid.getNumberOfColumns(); j++) { for(int j = 0; j < grid.getNumberOfColumns(); j++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment