package cellsociety.config; public class GameConfig { public GameConfig() public GameConfig(String filename) public int getWidth() public int getHeight() public int getSpeed() public int[][] getNeighbormap() public List getColors() public List getParams() public CellState[][] getInitialStates() public Ruleset getRuleset() public void setRuleset(Ruleset ruleset) public String toString() } package cellsociety.config; public class LevelLoader { public static void loadLevel(String levelFileName, GameConfig config) throws Exception public static void loadLevel(File levelFile, GameConfig config) } package cellsociety; public class Main extends Application { public void start(Stage primaryStage) } package cellsociety.model; public class SegregationRuleset extends Ruleset { public SegregationRuleset(GameConfig config) public List getParams() public void setParams(List newParams) public void step(Board board) public CellState getNextState(CellModel cell) public double fractionSameEthnic(CellModel cell, CellState current) public CellState defaultState() public List getValues() public CellState advance() } package cellsociety.model; public class FallingSandRuleset extends Ruleset { public FallingSandRuleset(GameConfig config) public void step(Board board) public List getParams() public void setParams(List newParams) public CellState getNextState(CellModel cell) public CellState defaultState() public List getValues() public CellState advance() } package cellsociety.model; public class ForestFireRuleset extends Ruleset { public ForestFireRuleset(GameConfig config) public List getParams() public void setParams(List newParams) public void step(Board board) public CellState getNextState(CellModel cell) public CellState defaultState() public List getValues() public CellState advance() } package cellsociety.model; public class Percolation extends Ruleset { public Percolation(GameConfig config) public List getParams() public void setParams(List newParams) public void step(Board board) public CellState getNextState(CellModel cell) public CellState defaultState() public List getValues() public CellState advance() } package cellsociety.model; public class LangtonsLoopRuleset extends Ruleset { public LangtonsLoopRuleset(GameConfig config) public void step(Board board) public CellState defaultState() public List getParams() public void setParams(List newParams) public CellState getNextState(CellModel cell) public List getValues() public CellState advance() } package cellsociety.model; public class GameOfLifeRuleset extends Ruleset { public GameOfLifeRuleset(GameConfig config) public void step(Board board) public CellState getNextState(CellModel cell) public List getParams() public void setParams(List newParams) public CellState defaultState() public List getValues() public CellState advance() } package cellsociety.model; public interface CellState { static int getFirstValue(CellState cell) { return getFirstValue(cell.getValues()); static int getFirstValue(List values) { return values.get(0).value(); default int getValue() { return ((Enum) this).ordinal(); default List getValues() { return List.of(CellValue.makeValue(getValue())); CellState advance(); record CellValue(int value, List modifiers) { public static CellValue makeValue(int value) { return makeValue("", value); public static CellValue makeValue(String modifiers, int value) { List modifierList = new ArrayList<>(); for (char c : modifiers.toCharArray()) { modifierList.add(c); return new CellValue(value, modifierList); } package cellsociety.model; public class WaTorWorldRuleset extends Ruleset { public abstract class AnimalState implements CellState { public WaTorWorldRuleset(GameConfig config) public void step(Board board) public CellState getNextState(CellModel cell) public CellState defaultState() public List getParams() public void setParams(List newParams) public AnimalState() public CellState advance() public int value() public int getValue() public abstract AnimalCondition step(); public abstract void move(CellModel cell, AnimalCondition stepResult, AnimalState nextState); public Shark(List values) public Shark() public List getValues() public AnimalCondition step() public void eat() public void resetCloneTime() public void move(CellModel cell, AnimalCondition stepResult, AnimalState nextState) public AnimalCondition step() public List getValues() public void move(CellModel cell, AnimalCondition stepResult, AnimalState nextState) public Fish(List values) public Fish() public List getValues() public AnimalCondition step() public void resetCloneTime() public void move(CellModel cell, AnimalCondition condition, AnimalState nextState) } package cellsociety.model; public class Board { public Board(GameConfig config) public void setNextCellState(CellState state, int x, int y) public CellState getNextState(int x, int y) public List getCells() public CellModel getCell(int x, int y) public int getWidth() public int getHeight() public void step() public List getNeighbors(int x, int y) public int countNeighbors(int x, int y, CellState state) public CellState[][] getBoardStates() public void advanceCellState(int x, int y) public void StepAndPrintLoop(int steps) } package cellsociety.model; public class CellModel { public CellModel(int x, int y, Ruleset ruleset, Board board) public CellModel(int x, int y, Ruleset ruleset, Board board, CellState state) public int getX() public int getY() public CellState getState() public void setState(CellState state) public void setStateForce(CellState state) public CellState getNextState() public List getNeighbors() public void setNextCellState(CellState state) public CellModel getCell(int x, int y) public int getWidth() public int getHeight() public int countNeighbors(CellState state) public List getCells() } package cellsociety.model; public abstract class Ruleset { public abstract void step(Board board); public abstract CellState getNextState(CellModel cell); public abstract CellState defaultState(); public abstract List getParams(); public abstract void setParams(List newParams); } package cellsociety.view; public class ViewHandler { public ViewHandler() public Node getBoardNodes() public Node getuiNodes() public void simulationStep() public void eventTogglePause() public void eventSpeedUp() } package cellsociety.view; public class CellView { public CellView(GameConfig gc) public void setColors(GameConfig gc) public int getState() public void setState(int s) public StackPane createTile() } package cellsociety.view; public class BoardView { public BoardView(GameConfig gc) public GridPane createGrid() public void step() } package cellsociety.view; public class StageMaker { public StageMaker(Stage first) public void addSimulation(Stage stage) } package cellsociety.view; public class SceneHandler { public SceneHandler(int w, int h) public Scene makeScene() } package cellsociety.view; public class UserInterfaceElements { public UserInterfaceElements(GameConfig gc) public Pane createuibar() public void createMenuScreen() }