Skip to content
Snippets Groups Projects
Commit 428ae57f authored by dragapsy's avatar dragapsy
Browse files

Tache 5 (Ajout de la methode Iterator<Cell> iterator() dans Cell + redefinition dans SquareCell).

parent dabbc26a
Branches
No related tags found
No related merge requests found
......@@ -41,6 +41,6 @@ public interface Cell {
* @return this {@link Cell}'s property
*/
Property<Color> getColorProperty();
Iterator<Cell> iterator();
}
package model;
import java.util.Iterator;
public class ColoredCellIterator implements Iterator<Cell> {
public ColoredCellIterator(SquareCell squareCell) {
}
@Override
public boolean hasNext() {
return false;
}
@Override
public Cell next() {
return null;
}
}
......@@ -52,5 +52,10 @@ public class SquareCell extends AbstractCell{
}
@Override
public Iterator<Cell> iterator() {
return new ColoredCellIterator(SquareCell.this);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment