Skip to content
Snippets Groups Projects
Commit e07b17ba authored by RAKOTOARISOA Andrianinarisaina cy's avatar RAKOTOARISOA Andrianinarisaina cy
Browse files

Tâche 3 (6.2) : Création de la classe CellGridIterator et mise en place de son constructeur

parent 994e693c
No related branches found
No related tags found
No related merge requests found
package model; package model;
import java.util.Iterator;
public class ArrayGrid implements model.Grid { public class ArrayGrid implements model.Grid {
//Tableau pour stocker les cellules //Tableau pour stocker les cellules
...@@ -42,6 +44,11 @@ public class ArrayGrid implements model.Grid { ...@@ -42,6 +44,11 @@ public class ArrayGrid implements model.Grid {
return null; return null;
} }
@Override
public Iterator<Cell> iterator() {
return null;
}
@Override @Override
public int getNumberOfRows() { public int getNumberOfRows() {
return 0; return 0;
......
package model;
import java.util.Iterator;
public class CellGridIterator implements Iterator<Cell> {
ArrayGrid[] grid ;
//Constructeur de la classe
public void CellGridIterator(ArrayGrid[] grid) {
grid = new ArrayGrid[]{} ;
}
//Méthode à implémenter
@Override
public boolean hasNext() {
return false;
}
//Méthode à implémenter
@Override
public Cell next() {
return null;
}
}
package model; package model;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
public interface ColorGenerator { public interface ColorGenerator {
......
package model; package model;
import java.util.Iterator;
public class GrayGrid implements Grid{ public class GrayGrid implements Grid{
private final int numberOfRows; private final int numberOfRows;
...@@ -27,6 +29,11 @@ public class GrayGrid implements Grid{ ...@@ -27,6 +29,11 @@ public class GrayGrid implements Grid{
return GrayCell.GRAY_CELL; return GrayCell.GRAY_CELL;
} }
@Override
public Iterator<Cell> iterator() {
return null;
}
/** /**
* Return the number of rows of this {@code Grid} * Return the number of rows of this {@code Grid}
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment