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

Maj importante apres perte de la class SC

parent 58329bfd
No related branches found
No related tags found
No related merge requests found
package model; package model;
import java.util.Iterator;
public class ArrayGrid implements Grid{ public class ArrayGrid implements Grid{
private Cell [][] cells; private Cell [][] cells;
...@@ -50,4 +52,6 @@ public class ArrayGrid implements Grid{ ...@@ -50,4 +52,6 @@ public class ArrayGrid implements Grid{
} }
} }
} }
} }
...@@ -40,4 +40,9 @@ public class GrayGrid implements Grid{ ...@@ -40,4 +40,9 @@ public class GrayGrid implements Grid{
public int getNumberOfColumns() { public int getNumberOfColumns() {
return numnberOfColumns; return numnberOfColumns;
} }
@Override
public void color(ColorGenerator colorGenerator) {
}
} }
...@@ -3,7 +3,6 @@ package model; ...@@ -3,7 +3,6 @@ package model;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import java.util.ArrayList; 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,6 +10,7 @@ public class SquareCell extends AbstractCell{ ...@@ -11,6 +10,7 @@ public class SquareCell extends AbstractCell{
List<Cell> neighbours; List<Cell> neighbours;
public SquareCell(){ public SquareCell(){
setColor(AbstractCell.DEFAULT_CELL_COLOR); setColor(AbstractCell.DEFAULT_CELL_COLOR);
setNeighbours(null); setNeighbours(null);
......
...@@ -11,9 +11,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; ...@@ -11,9 +11,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
class ArrayGridTest { class ArrayGridTest {
// TODO
// uncomment
/*
private ArrayGrid arrayGridThreeFour; private ArrayGrid arrayGridThreeFour;
private final ArrayGrid arrayGridTwoTwo = new ArrayGrid(2,2); private final ArrayGrid arrayGridTwoTwo = new ArrayGrid(2,2);
...@@ -76,8 +74,8 @@ class ArrayGridTest { ...@@ -76,8 +74,8 @@ class ArrayGridTest {
} }
} }
@Test //@Test
void testIterator() { /* void testIterator() {
Iterator<Cell> iterator = arrayGridTwoTwo.iterator(); Iterator<Cell> iterator = arrayGridTwoTwo.iterator();
assertThat(iterator.hasNext()).isTrue(); assertThat(iterator.hasNext()).isTrue();
assertThat(iterator.next()).isEqualTo(arrayGridTwoTwo.getCell(0,0)); assertThat(iterator.next()).isEqualTo(arrayGridTwoTwo.getCell(0,0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment