package cellsociety.config; public class Parser { public Parser(File xmlFile) public Document getDocument() public String getEdgeType() public void getBasicInfo() public Map getStateColors() public int getWidth() public int getHeight() public String getTypeName() public String getTitle() public String getAuthor() public String getDescription() public String getArrangement() public int[][] getCells() public GameType getGameTypeFromName() public Document createConfigFile(String newTitle, String newAuthor, String newDesc) } package cellsociety.config; public class InvalidConfigurationException extends Exception { public InvalidConfigurationException(String message) public InvalidConfigurationException(String message, Object... args) public void showErrorDialog() public void showLanguageErrorDialog() } package cellsociety.config; public class RandomizeXml { public static void randomizeCellStates(NodeList cells, int[][] grid, Element randomizeElement) } package cellsociety.config; public class LanguageManager { public static void updateLanguage(Node node) public static String getText(String key) } package cellsociety.config; public class FileManagement { public static final String DATA_FILE_FOLDER public static void setResourceBundle(ResourceBundle bundle) public void retrieveFile(Stage primaryStage) public GamePlay[] getGamePlays() public static void showMessage(AlertType type, String message) public void saveFile(String title, String author, String desc, GamePlay gamePlay) } package cellsociety.model.cells; public class PercolationCell extends Cell { public PercolationCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateWater() public void setNextStateBlocked() } package cellsociety.model.cells; public class ModelOfSegregationCell extends Cell { public ModelOfSegregationCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateGroupA() public void setNextStateGroupB() public void setNextStateSame() public int getOppositeGroup() } package cellsociety.model.cells; public class SpreadingOfFireCell extends Cell { public SpreadingOfFireCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateTree() public void setNextStateBurning() } package cellsociety.model.cells; public class ForagingAntsCell extends Cell { public ForagingAntsCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateNest(int homePheromoneLevel) public void setNextStateFood() public void setNextStateAnt(boolean hasFood, boolean atFoodSource, int[] orientation) public void setNextStatePheromone() public boolean hasFood() public boolean atFoodSource() public boolean nextStateNotAnt() public int[] getOrientation() public int getFoodPheromoneLevel() public int getHomePheromoneLevel() public void setPheromoneLevels(int foodLevel, int homeLevel) public void setOrientation(int row, int col) } package cellsociety.model.cells; public class WaTorWorldCell extends Cell { public WaTorWorldCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateFish(int reproductionAge) public void setNextStateShark(int reproductionAge, int energy) public int getReproductionAge() public int getEnergy() public void resetReproductionAge() public void resetStartingEnergy(int startingEnergy) public boolean fishAlive() } package cellsociety.model.cells; public class GameOfLifeCell extends Cell { public GameOfLifeCell(int row, int col, int state) public void setNextStateAlive() public void setNextStateDead() } package cellsociety.model.cells; public class Cell { public Cell() public Cell(int row, int col, int state) public void switchState() public int getCurrentState() public int getRowPos() public int getColPos() public boolean isAvailable(int state) public boolean nextStateNull() public void manuallySetState(int newState) } package cellsociety.model.cells; public class FallingSandCell extends Cell { public FallingSandCell(int row, int col, int state) public void setNextStateEmpty() public void setNextStateSand() public void setNextStateMetal() public void setNextStateWater() public boolean canBeWater() public boolean nextStateEmpty() public boolean nextStateWater() } package cellsociety.model.gametypes; public class GameOfLife extends GameType { public GameOfLife(int[][] parserGrid) public void setCellNextState(GameOfLifeCell currCell) protected GameOfLifeCell[][] createCellGridStructure(int rows, int columns) protected GameOfLifeCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.model.gametypes; public class Percolation extends GameType { public Percolation(int[][] parserGrid) public void setCellNextState(PercolationCell currCell) protected PercolationCell[][] createCellGridStructure(int rows, int columns) protected PercolationCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.model.gametypes; public class FallingSand extends GameType { public FallingSand(int[][] parserGrid) public void setCellNextState(FallingSandCell currCell) protected FallingSandCell[][] createCellGridStructure(int rows, int columns) protected FallingSandCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.model.gametypes; public class ForagingAnts extends GameType { public ForagingAnts(int[][] parserGrid, int antsInNest, int maxPheromoneLevel) public void setCellNextState(ForagingAntsCell currCell) public ForagingAntsCell moveTowardsFood(ForagingAntsCell currCell) protected ForagingAntsCell[][] createCellGridStructure(int rows, int columns) protected ForagingAntsCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.model.gametypes; public class SpreadingOfFire extends GameType { public SpreadingOfFire(int[][] parserGrid, double probCatch, double probGrow) public void setCellNextState(SpreadingOfFireCell currCell) protected SpreadingOfFireCell[][] createCellGridStructure(int rows, int columns) protected SpreadingOfFireCell createCell(int row, int col, int state) public List getParamList() public void updateParams(Map newParams) public int getTotalStates() } package cellsociety.model.gametypes; public abstract class GameType { protected final Random random public GameType() public GameType(int[][] parserGrid) public abstract void setCellNextState(T cell); public abstract void updateParams(Map newParams); public abstract List getParamList(); public abstract int getTotalStates(); protected abstract T[][] createCellGridStructure(int rows, int columns); protected abstract T createCell(int row, int col, int state); public void createCellGrid(int[][] parserGrid) protected T[][] getGrid() protected void setGrid(T[][] newGrid) protected void setGridCell(int row, int col, T cell) public void resetGame(int[][] parserGrid) protected void setNumGameStateIterations(int iterations) public int[][] updateGameState() public void setEdgeType(String edgeType) public int countUpAndDownNeighbors(T currCell, int state) public int countUpAndDownNeighborsWrapped(T currCell, int state) public int countDiagonalNeighbors(T currCell, int state) public int countDiagonalNeighborsWrapped(T currCell, int state) public boolean determineRandomOutcome(double probability) public Map getPopulationStatistics() public void incrementCell(int row, int col, int totalStates) public void setStateMap(Map states) public Map getStateMap() public void setArrangement(String newArrangement) } package cellsociety.model.gametypes; public class WaTorWorld extends GameType { public WaTorWorld(int[][] parserGrid, int reproductionAgeLimit, int startingEnergy, public void setCellNextState(WaTorWorldCell currCell) public void createCellGrid(int[][] parserGrid) protected WaTorWorldCell[][] createCellGridStructure(int rows, int columns) protected WaTorWorldCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.model.gametypes; public class ModelOfSegregation extends GameType { public ModelOfSegregation(int[][] parserGrid, double neighborPercentage) public void setCellNextState(ModelOfSegregationCell currCell) protected ModelOfSegregationCell[][] createCellGridStructure(int rows, int columns) protected ModelOfSegregationCell createCell(int row, int col, int state) public void updateParams(Map newParams) public List getParamList() public int getTotalStates() } package cellsociety.view; public class GamePlay { public GamePlay(File configFile, Stage primaryStage, FileManagement manager, int factor) public Parser getParser() public Scene getScene() public BorderPane getRoot() public FileManagement getManager() public GameType getGame() public void updateTimeline(double seconds) public void stopSimulation() public void resetGame() public void loadNewSimulation(FileManagement manager) public boolean isRunning() } package cellsociety.view; public class Main extends Application { public void start(Stage primaryStage) } package cellsociety.view.assets; public class Util { public static HBox handleTitle(String title) public static HBox handleButtons(GamePlay gamePlay, Slider slider, Grid grid, int[][] stateGrid, public static void handleSlider(VBox gridAndButtons, GamePlay gamePlay, public static void editSaveWindow(GamePlay gamePlay) public static void modifyWindow(List params, GamePlay gamePlay, Grid grid) public static Scene configureNewSimulation(FileManagement manager) public static void histogramWindow(Map stats, GamePlay gamePlay) } package cellsociety.view.assets; public class Grid { public static final Map colors public static final Map numbers public Grid(int[][] stateGrid, String gameType, GamePlay gamePlay, int gridWidth, int gridHeight, public void updateGrid(int[][] stateGrid, String gameType) public void setBorders() public GridPane getGrid() public void setBorderStatus() public boolean getBordersStatus() } package cellsociety.view.assets; public class AboutBox { public AboutBox(String author, String description, int factor) public StackPane getAboutBox() } package cellsociety.view.assets; public class StateNamesMap { public static final Map gameOfLife public static final Map spreadingOfFire public static final Map percolation public static final Map segregation public static final Map wator public static final Map ants } package cellsociety.view; public class Gui { public Gui(int[][] grid, List params, GamePlay gamePlay, int factor, public void updateGrid(int[][] stateGrid, String gameType) public BorderPane getRoot() public Scene getScene() }