Skip to content
Snippets Groups Projects
Commit c1e580c0 authored by dragapsy's avatar dragapsy
Browse files

Revert "MAJ"

This reverts commit 2093223c.
parent 2093223c
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,6 @@ package model; ...@@ -2,8 +2,6 @@ package model;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
...@@ -11,21 +9,6 @@ public class SquareCell extends AbstractCell{ ...@@ -11,21 +9,6 @@ public class SquareCell extends AbstractCell{
List<Cell> neighbours; 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. * 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{ ...@@ -34,7 +17,7 @@ public class SquareCell extends AbstractCell{
*/ */
@Override @Override
public List<Cell> getNeighbours() { public List<Cell> getNeighbours() {
return neighbours; return null;
} }
/** /**
...@@ -45,17 +28,6 @@ public class SquareCell extends AbstractCell{ ...@@ -45,17 +28,6 @@ public class SquareCell extends AbstractCell{
*/ */
@Override @Override
public void setNeighbours(List<Cell> cells) { public void setNeighbours(List<Cell> cells) {
if (cells==null){
neighbours=new ArrayList<>();
}
else {
neighbours=new ArrayList<>();
for (Cell value:cells)
{
neighbours.add(value);
}
}
} }
......
...@@ -13,7 +13,7 @@ class SquareCellTest { ...@@ -13,7 +13,7 @@ class SquareCellTest {
// TODO // TODO
// uncomment // uncomment
/*
private final Cell northCell = new SquareCell(Color.NAVY); private final Cell northCell = new SquareCell(Color.NAVY);
private final Cell southCell = new SquareCell(Color.SALMON); private final Cell southCell = new SquareCell(Color.SALMON);
private final Cell westCell = new SquareCell(Color.WHEAT); private final Cell westCell = new SquareCell(Color.WHEAT);
...@@ -51,5 +51,5 @@ class SquareCellTest { ...@@ -51,5 +51,5 @@ class SquareCellTest {
assertThat(centralCell.getNeighbours()).containsExactlyInAnyOrder(northCell,southCell); assertThat(centralCell.getNeighbours()).containsExactlyInAnyOrder(northCell,southCell);
} }
*/
} }
\ 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