diff --git a/README.md b/README.md index 7bcec58d58606f656ddbdab538783ab330766490..5ba69e07a1c3747c0bd23e0114b61e926297f0ab 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,4 @@ Il s'agit d'implémenter une version du jeu "inondation" (voir par exemple [ici] ## Membre du projet -- NOM, prénom -- NOM, prénom +- Nguyen thi hang groupe 3 diff --git a/app/src/main/java/model/SquareCell.java b/app/src/main/java/model/SquareCell.java index 14f51e9fb9c85ba7fc0c6069ae676556a200bbbe..adac1141eadad457cd20b268921e02af63804e65 100644 --- a/app/src/main/java/model/SquareCell.java +++ b/app/src/main/java/model/SquareCell.java @@ -9,6 +9,18 @@ public class SquareCell extends AbstractCell{ List<Cell> neighbours; + public SquareCell (){ + Cell DEFAULT_CELL_COLOR; + } + public SquareCell(Color color){ + this.setColor(color); + } + public SquareCell(Color color,List<Cell> neighbours ){ + this.setColor(color); + this.neighbours= neighbours; + + } + /** * A cell is placed somewhere on a grid. Its neighbours thus depend on the underlying grid. @@ -17,7 +29,7 @@ public class SquareCell extends AbstractCell{ */ @Override public List<Cell> getNeighbours() { - return null; + return this.neighbours; } /** @@ -28,6 +40,9 @@ public class SquareCell extends AbstractCell{ */ @Override public void setNeighbours(List<Cell> cells) { + this.neighbours=cells; + + }