Skip to content
Snippets Groups Projects
Commit 11d9207d authored by Guyslain's avatar Guyslain
Browse files

section 7 GameOfLifeAutomaton fini

parent 810e3415
No related branches found
No related tags found
No related merge requests found
...@@ -6,31 +6,33 @@ import java.util.Random; ...@@ -6,31 +6,33 @@ import java.util.Random;
public class GameOfLifeAutomaton implements CellularAutomaton<GameOfLifeState> { public class GameOfLifeAutomaton implements CellularAutomaton<GameOfLifeState> {
private final int numberOfColumns;
private final int numberOfRows;
public GameOfLifeAutomaton(int numberOfColumns, int numberOfRows) { public GameOfLifeAutomaton(int numberOfColumns, int numberOfRows) {
//TODO: à compléter this.numberOfColumns = numberOfColumns;
this.numberOfRows = numberOfRows;
} }
@Override @Override
public int numberOfColumns() { public int numberOfColumns() {
//TODO: à compléter return numberOfColumns;
return 0;
} }
@Override @Override
public int numberOfRows() { public int numberOfRows() {
//TODO: à compléter return numberOfRows;
return 0;
} }
@Override @Override
public GameOfLifeState defaultState() { public GameOfLifeState defaultState() {
//TODO: à compléter return GameOfLifeState.DEAD;
return null;
} }
@Override @Override
public GameOfLifeState randomState(Random generator) { public GameOfLifeState randomState(Random generator) {
//TODO: à compléter return generator.nextBoolean()?
return null; GameOfLifeState.ALIVE:
GameOfLifeState.DEAD;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment