Select Git revision
Forked from
LABOUREL Arnaud / Firefighter template
Source project has a limited visibility.
-
MAAZOUZ Ilyas authoredMAAZOUZ Ilyas authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
SquareCell.java 1.56 KiB
package model;
import javafx.scene.paint.Color;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class SquareCell extends AbstractCell{
List<Cell> neighbours;
Color color ;
//constructeur 1 : un constructeur sans paramètres qui construit une liste de cellule vide
//de couleur DEFAULT_CELL_COLOR avec une liste de voisins vide
public void SquareCell() {
this.neighbours = new ArrayList<Cell>() ;
color = DEFAULT_CELL_COLOR ;
}
//Constructeur 2 : un constructeur ayant en paramètre une couleur color
//qui construit une cellule de couleur color et dont les voisins sont vides
public void SquareCell(Color color) {
this.neighbours = new ArrayList<Cell>() ;
this.color = color ;
}
//Constructeur 3 : un constructeur avec deux paramètres : "Color color" et "ArrayList<Cell> neighbours
//qui consrtuit une cellule de couleur color et dont les cellules voisines sont neighours
//@Override
public void SquareCell(Color color, List<Cell> neighbours) {
this.neighbours = neighbours ;
this.color = color ;
}
@Override
public List<Cell> getNeighbours() {
return null;
}
/**
* 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) {
}
@Override
public Iterator<Cell> iterator() {
return null;
}
}