Skip to content
Snippets Groups Projects
SquareCell.java 1.56 KiB
Newer Older
  • Learn to ignore specific revisions
  • TRAVERS Corentin's avatar
    TRAVERS Corentin committed
    package model;
    
    import javafx.scene.paint.Color;
    
    
    TRAVERS Corentin's avatar
    TRAVERS Corentin committed
    import java.util.Iterator;
    import java.util.List;
    
    public class SquareCell extends AbstractCell{
    
        List<Cell> neighbours;
    
    TRAVERS Corentin's avatar
    TRAVERS Corentin committed
    
    
        //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
    
        public void SquareCell(Color color, List<Cell> neighbours) {
            this.neighbours = neighbours ;
            this.color = color ;
        }
    
    TRAVERS Corentin's avatar
    TRAVERS Corentin committed
    
        @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) {
    
        }
    
    
    TRAVERS Corentin's avatar
    TRAVERS Corentin committed
    
    }