Skip to content
Snippets Groups Projects
Commit 0b764895 authored by BEL KHALIFA Mohamed amine's avatar BEL KHALIFA Mohamed amine
Browse files

9111

parent c9078a2d
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package model;
import javafx.scene.paint.Color;
import java.util.Iterator;
public class ArrayGrid implements Grid{
private Cell[][] cells;
......@@ -15,6 +17,9 @@ public class ArrayGrid implements Grid{
}
}
}
@Override
public Cell getCell(int row, int column) {
return this.cells[row][column];
......@@ -38,4 +43,18 @@ public class ArrayGrid implements Grid{
}
}
}
public Iterator<Cell> iterator() {
return null;
}
@Override
public boolean hasNext() {
return false;
}
@Override
public Cell next() {
return null;
}
}
package model;
import java.util.Iterator;
public class CellGridIterator implements Iterator<Cell> {
public CellGridIterator(ArrayGrid grid) {
}
@Override
public boolean hasNext() {
return false;
}
@Override
public Cell next() {
ArrayGrid grid = new ArrayGrid(grid.getNumberOfRows(), grid.getNumberOfColumns());
for(int i = 0; i < grid.getNumberOfRows() ; i++) {
for(int j = 0; j < grid.getNumberOfColumns(); j++) {
}
}
return Cell;
}
}
package model;
public interface Grid {
import java.util.Iterator;
public interface Grid extends Iterator<Cell> {
/**
* Return the cell located at the given coordinates in the grid.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment