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

test

parent 23592930
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package model;
import javafx.scene.paint.Color;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
......@@ -10,26 +12,29 @@ public class SquareCell extends AbstractCell{
List<Cell> neighbours;
/**
* A cell is placed somewhere on a grid. Its neighbours thus depend on the underlying grid.
*
* @return the list of cell that are neighbours of this{@code Cell}.
*/
public SquareCell() {
AbstractCell cell = new SquareCell();
}
public SquareCell(Color color){
AbstractCell cell = new SquareCell(color);
}
public SquareCell(Color color,List<Cell>neighbours){
AbstractCell cell = new SquareCell(color,neighbours);
}
@Override
public List<Cell> getNeighbours() {
return null;
return this.neighbours;
}
/**
* Update the list of neighbours of this {@code Cell}.
*
* @param cells a list of cells that are the neighbours of this {@code cell}
* int the underlying grid.
*/
@Override
public void setNeighbours(List<Cell> cells) {
for (int i = 0; i < neighbours.size() ; i++) {
this.neighbours.set(i,cells.get(i));
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment