Skip to content
Snippets Groups Projects
Commit a1929313 authored by SAIDI Hatim's avatar SAIDI Hatim
Browse files

test

parent 6cab93ef
Branches
No related tags found
No related merge requests found
package model;
import java.util.Iterator;
public class ArrayGrid implements Grid{
private Cell[][] cells;
......@@ -34,14 +36,12 @@ public class ArrayGrid implements Grid{
}
public void color(ColorGenerator colorGenerator){
for (int j = 0; j < this.numberOfColumns; j++) {
for (int i = 0; i < this.numberOfRows; i++) {
SquareCell cell = new SquareCell();
cells[i][j].setColor(colorGenerator.nextColor(cell));
}
}
for(Cell cell : this)
cell.setColor(colorGenerator.nextColor(new SquareCell()));
}
public Iterator<Cell> iterator(){
return null ;
}
......
package model;
public interface Grid {
public interface Grid extends Iterable<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