Skip to content
Snippets Groups Projects
Commit 35c55f6c authored by AREZKI Celia's avatar AREZKI Celia
Browse files

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/main/java/model/FirefighterBoard.java
parents 47698c64 61b24491
No related branches found
No related tags found
No related merge requests found
Pipeline #40334 failed
...@@ -3,7 +3,7 @@ package view; ...@@ -3,7 +3,7 @@ package view;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
public enum ViewElement { public enum ViewElement {
FIREFIGHTER(Color.BLUE), FIRE(Color.RED), EMPTY(Color.WHITE); FIREFIGHTER(Color.BLUE), FIRE(Color.RED), EMPTY(Color.WHITE) , CLOUD(Color.GRAY), MOUNTAIN(Color.GRAY), ROCKY(Color.GRAY);
final Color color; final Color color;
ViewElement(Color color) { ViewElement(Color color) {
this.color = color; this.color = color;
......
...@@ -10,17 +10,17 @@ import static org.assertj.core.api.Assertions.*; ...@@ -10,17 +10,17 @@ import static org.assertj.core.api.Assertions.*;
public class FirefighterBoardTest { public class FirefighterBoardTest {
@Test @Test
void testColumnCount(){ void testColumnCount(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3); FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
assertThat(board.columnCount()).isEqualTo(20); assertThat(board.columnCount()).isEqualTo(20);
} }
@Test @Test
void testRowCount(){ void testRowCount(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3); FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
assertThat(board.rowCount()).isEqualTo(10); assertThat(board.rowCount()).isEqualTo(10);
} }
@Test @Test
void testStepNumber(){ void testStepNumber(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3); FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
for(int index = 0; index < 10; index++){ for(int index = 0; index < 10; index++){
assertThat(board.stepNumber()).isEqualTo(index); assertThat(board.stepNumber()).isEqualTo(index);
board.updateToNextGeneration(); board.updateToNextGeneration();
...@@ -29,7 +29,7 @@ public class FirefighterBoardTest { ...@@ -29,7 +29,7 @@ public class FirefighterBoardTest {
} }
@Test @Test
void testGetState_afterSet(){ void testGetState_afterSet(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 0, 0); FirefighterBoard board = new FirefighterBoard(20, 10, 0, 0);
Position position = new Position(1,2); Position position = new Position(1,2);
assertThat(board.getState(position)).isEmpty(); assertThat(board.getState(position)).isEmpty();
board.setState(List.of(ModelElement.FIRE), position); board.setState(List.of(ModelElement.FIRE), position);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment