diff --git a/app/src/main/java/model/SquareCell.java b/app/src/main/java/model/SquareCell.java index 35f1b095d8eb861652a45589d32b8d9ffce1dba0..14f51e9fb9c85ba7fc0c6069ae676556a200bbbe 100644 --- a/app/src/main/java/model/SquareCell.java +++ b/app/src/main/java/model/SquareCell.java @@ -2,8 +2,6 @@ package model; import javafx.scene.paint.Color; -import java.util.ArrayList; -import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -11,21 +9,6 @@ public class SquareCell extends AbstractCell{ List<Cell> neighbours; - public SquareCell(){ - setColor(AbstractCell.DEFAULT_CELL_COLOR); - setNeighbours(null); - - } - public SquareCell( Color color){ - setColor(color); - setNeighbours(null); - - } - public SquareCell(Color color,List<Cell>neighbours){ - SquareCell Cell=new SquareCell(color); - setNeighbours( neighbours); - } - /** * A cell is placed somewhere on a grid. Its neighbours thus depend on the underlying grid. @@ -34,7 +17,7 @@ public class SquareCell extends AbstractCell{ */ @Override public List<Cell> getNeighbours() { - return neighbours; + return null; } /** @@ -45,19 +28,8 @@ public class SquareCell extends AbstractCell{ */ @Override public void setNeighbours(List<Cell> cells) { - if (cells==null){ - neighbours=new ArrayList<>(); - } - else { - - neighbours=new ArrayList<>(); - for (Cell value:cells) - { - neighbours.add(value); - } - } } -} \ No newline at end of file +} diff --git a/app/src/test/java/model/SquareCellTest.java b/app/src/test/java/model/SquareCellTest.java index fa145721779a4dbb5364a5220ad0d7b1999b8c7a..7551867da2d050faece42dfefbb507c0f558d82f 100644 --- a/app/src/test/java/model/SquareCellTest.java +++ b/app/src/test/java/model/SquareCellTest.java @@ -13,7 +13,7 @@ class SquareCellTest { // TODO // uncomment - + /* private final Cell northCell = new SquareCell(Color.NAVY); private final Cell southCell = new SquareCell(Color.SALMON); private final Cell westCell = new SquareCell(Color.WHEAT); @@ -51,5 +51,5 @@ class SquareCellTest { assertThat(centralCell.getNeighbours()).containsExactlyInAnyOrder(northCell,southCell); } - + */ } \ No newline at end of file