package cellsociety.io; public class SIMFileReader { public static Map getMetadataFromFile(File file) throws FileNotFoundError, UnhandledExceptionError } package cellsociety.io; public class CSVFileReader { public static int[][] readFile(File file) public static int[] toIntArray(String[] myArray) } package cellsociety.io; public class FileHandler { public static void saveFile(Grid grid, Stage stage) } package cellsociety.logic.shapes; public class TriangleShapeManager extends ShapeManager{ public List getNeighborsLeft(Coordinate cellCoordinates) public List getNeighborsRight(Coordinate cellCoordinates) public List getNeighborsUp(Coordinate cellCoordinates) public List getNeighborsDown(Coordinate cellCoordinates) public List getAllNeighborsLeft(Coordinate cellCoordinates) public List getAllNeighborsRight(Coordinate cellCoordinates) public List getAllNeighborsUp(Coordinate cellCoordinates) public List getAllNeighborsDown(Coordinate cellCoordinates) } package cellsociety.logic.shapes; public class HexagonShapeManager extends ShapeManager{ public List getNeighborsLeft(Coordinate cellCoordinates) public List getNeighborsRight(Coordinate cellCoordinates) public List getNeighborsUp(Coordinate cellCoordinates) public List getNeighborsDown(Coordinate cellCoordinates) public List getAllNeighborsLeft(Coordinate cellCoordinates) public List getAllNeighborsRight(Coordinate cellCoordinates) public List getAllNeighborsUp(Coordinate cellCoordinates) public List getAllNeighborsDown(Coordinate cellCoordinates) } package cellsociety.logic.shapes; public class SquareShapeManager extends ShapeManager { public SquareShapeManager() public List getNeighborsLeft(Coordinate cellCoordinates) public List getNeighborsRight(Coordinate cellCoordinates) public List getNeighborsUp(Coordinate cellCoordinates) public List getNeighborsDown(Coordinate cellCoordinates) public List getAllNeighborsLeft(Coordinate cellCoordinates) public List getAllNeighborsRight(Coordinate cellCoordinates) public List getAllNeighborsUp(Coordinate cellCoordinates) public List getAllNeighborsDown(Coordinate cellCoordinates) } package cellsociety.logic.shapes; public abstract class ShapeManager { public List getAllNeighbors (Coordinate cellCoordinates) public List getNeighborsUL(Coordinate cellCoordinates) public List getNeighborsDL(Coordinate cellCoordinates) public List getNeighborsUR(Coordinate cellCoordinates) public List getNeighborsDR(Coordinate cellCoordinates) public abstract List getNeighborsLeft(Coordinate cellCoordinates); public abstract List getNeighborsRight(Coordinate cellCoordinates); public abstract List getNeighborsUp(Coordinate cellCoordinates); public abstract List getNeighborsDown(Coordinate cellCoordinates); public abstract List getAllNeighborsLeft(Coordinate cellCoordinates); public abstract List getAllNeighborsRight(Coordinate cellCoordinates); public abstract List getAllNeighborsUp(Coordinate cellCoordinates); public abstract List getAllNeighborsDown(Coordinate cellCoordinates); } package cellsociety.logic.simulations; public class FireSpreading extends Simulation { public FireSpreading(Grid grid, NeighborhoodPattern np, Map metadata) } package cellsociety.logic.simulations; public abstract class Simulation { public Simulation(Grid grid, NeighborhoodPattern np, Map metadata) throws MissingSimulationArgumentError public Grid getGrid() public Map getMetaData() public void update() public NeighborhoodPattern getNeighborhoodPattern() public int getDefaultValue() } package cellsociety.logic.simulations; public class GameOfLife extends Simulation { public GameOfLife(Grid grid, NeighborhoodPattern np, Map metadata) throws MissingSimulationArgumentError } package cellsociety.logic.simulations; public class Percolation extends Simulation { public Percolation(Grid grid, NeighborhoodPattern np, Map metadata) } package cellsociety.logic.simulations; public class WaTorWorld extends Simulation { public WaTorWorld(Grid grid, NeighborhoodPattern np, Map metadata) throws MissingSimulationArgumentError } package cellsociety.logic.simulations; public class ModelOfSegregation extends Simulation { public ModelOfSegregation(Grid grid, NeighborhoodPattern np, Map metadata) } package cellsociety.logic.neighborhoodpatterns; public class CornerNeighborPattern extends NeighborhoodPattern{ public CornerNeighborPattern() public List getNeighborhoodGroup(Coordinate myCenter, ShapeManager myShape) } package cellsociety.logic.neighborhoodpatterns; public class CardinalNeighborPattern extends NeighborhoodPattern{ public CardinalNeighborPattern() public List getNeighborhoodGroup(Coordinate myCenter, ShapeManager myShape) } package cellsociety.logic.neighborhoodpatterns; public abstract class NeighborhoodPattern { public abstract List getNeighborhoodGroup(Coordinate myCenter, ShapeManager myShape); } package cellsociety.logic.neighborhoodpatterns; public class CompleteNeighborPattern extends NeighborhoodPattern{ public CompleteNeighborPattern() public List getNeighborhoodGroup(Coordinate myCenter, ShapeManager myShape) } package cellsociety.logic.grid; public abstract class Grid { public Grid (int[][] states, ShapeManager shapeManager) public void addCellIfAbsent(int r, int c, int state) public Cell getCell(int r, int c) public abstract List getNeighbors(Cell cell, NeighborhoodPattern myPattern); public void moveCellTo(Cell sourceCell, int r, int c) public void moveCellTo(Cell sourceCell, Cell targetCell) public void changeCell(Cell c, int state, Map currentAltStates) public void changeCell(Coordinate c, int state) public void updateCells() public void updateCell(Coordinate c) public List getCellsToUpdate() public void setMyCells(Map myCells) public int getHeight() public void setHeight(int height) public int getWidth() public void setWidth(int width) } package cellsociety.logic.grid; public class ToroidalGrid extends Grid { public ToroidalGrid(int[][] states, ShapeManager shapeManager) public List getNeighbors(Cell cell, NeighborhoodPattern myPattern) } package cellsociety.logic.grid; public class FiniteGrid extends Grid { public FiniteGrid(int[][] states, ShapeManager shapeManager) public List getNeighbors(Cell cell, NeighborhoodPattern myPattern) } package cellsociety.logic.grid; public class Cell { public Cell(int r, int c, int state) public Coordinate getCoordinates() public int getCurrentState() public void setCurrentState(int state) public int getNextState() public void setNextState(int state) public Map getAltStates() public void setAltStates(Map newStates) public void addState(String state, int value) public Map getNextAltStates() public void setNextAltStates(Map updatedStates) public void addToNextState(String state, int value) public boolean equals(Object o) } package cellsociety.logic.grid; public class InfiniteGrid extends Grid{ public InfiniteGrid(int[][] states, ShapeManager shapeManager) public List getNeighbors(Cell cell, NeighborhoodPattern myPattern) } package cellsociety.controller; public class LogicController { public static final ResourceBundle FILE_ARGUMENT_PROPERTIES = ResourceBundle.getBundle("cellsociety.controller.FileArguments"); public static final String TYPE = FILE_ARGUMENT_PROPERTIES.getString("Type"); public static final String INITIAL_STATE_FILE = FILE_ARGUMENT_PROPERTIES.getString("InitialStates"); public LogicController() public void initializeFromFile(File file) public Simulation GameOfLife(Grid grid, NeighborhoodPattern np, Map metadata) public Simulation ModelOfSegregation(Grid grid, NeighborhoodPattern np, Map metadata) public Simulation Percolation(Grid grid, NeighborhoodPattern np, Map metadata) public Simulation FireSpreading(Grid grid, NeighborhoodPattern np, Map metadata) public Simulation Wator(Grid grid, NeighborhoodPattern np, Map metadata) public void setDisplay(Display display) public Stage getStage() public Grid getActiveGrid() public void pauseSimulation() public void playSimulation() public Simulation getCurrentSimulation() public void update() public void resetDisplay() public void setSpeed(int speed) public Map getMetaData() public int getSimulationDefaultValue() } package cellsociety.controller; public class Controller { public Controller(Stage myStage) public void saveCurrentGrid(LogicController logicController) public void loadFile(File file, LogicController logicController, Stage stage) public Display loadNewDisplay(File file) public void update() public LogicController getLogicController() public Stage getStage() public void setMyDisplay(String file) } package cellsociety; public class Main extends Application { public static final double WINDOW_DEFAULT_WIDTH = Double.parseDouble(ResourceBundle.getBundle("cellsociety.ProgramSettings").getString("DefaultWidth")); public static final double WINDOW_DEFAULT_HEIGHT = Double.parseDouble(ResourceBundle.getBundle("cellsociety.ProgramSettings").getString("DefaultHeight")); public void start(Stage primaryStage) throws Exception } package cellsociety.display; public class HexagonDisplay extends Display{ public HexagonDisplay(Stage stage, Color background) public void initializeGrid(List cells) public void resetGrid() public void updateScene(List cells) public Coordinate changeCell(double mouseX, double mouseY, List cells) } package cellsociety.display; public abstract class Display { public static Map COLOR_MAP = new HashMap(); public Display(Stage myStage, Color background) public abstract void initializeGrid(List cells); public abstract void resetGrid(); public abstract void updateScene(List cells); public abstract Coordinate changeCell(double mouseX, double mouseY, List cells); public void addButtons(Node...nodes)// saveButton, Button playButton, Button pauseButton, Button resetButton, Button loadButton, Slider speedSlider) public void showError(Exception e) public Stage getMyStage() } package cellsociety.display; public class ButtonManager { public static void initializeButtons(Display myDisplay, LogicController myLogicController, Controller myController, Stage myStage) } package cellsociety.display; public class TriangleDisplay extends Display{ public TriangleDisplay(Stage stage, Color background) public void initializeGrid(List cells) public void resetGrid() public void updateScene(List cells) public Coordinate changeCell(double mouseX, double mouseY, List cells) } package cellsociety.display; public class SquareDisplay extends Display{ public SquareDisplay(Stage stage, Color background) public void initializeGrid(List cells) public void resetGrid() public void updateScene(List cells) public Coordinate changeCell(double mouseX, double mouseY, List cells) } package cellsociety.errors; public class InvalidSimulationTypeError extends Exception { public InvalidSimulationTypeError(String type) public String getType() } package cellsociety.errors; public class UnhandledExceptionError extends Exception { public UnhandledExceptionError() } package cellsociety.errors; public class FileNotFoundError extends FileNotFoundException { public FileNotFoundError (String filename) public String getFilename() } package cellsociety.errors; public class MissingSimulationArgumentError extends IllegalArgumentException { public MissingSimulationArgumentError(String argument) public String getArgument() } package cellsociety.errors; public class InvalidFileFormatError extends Exception { public InvalidFileFormatError (String filename) public String getFilename() }