package cell; public abstract class Cell { public abstract Cell nextState (List neighbors); public Color getDisplayColor() } package cell.firesim; public class EmptyCell extends FireSimCell{ public EmptyCell(double pCatch, double pLight, double pGrow) public Cell nextState(List neighbors) } package cell.firesim; public class FireCell extends FireSimCell{ public FireCell(double pCatch, double pLight, double pGrow) public Cell nextState(List neighbors) } package cell.firesim; public abstract class FireSimCell extends Cell{ public FireSimCell (double pCatch, double pLight, double pGrow) public double getFireProb() public void setFireProb(double p) public double getLightningProb() public void setLightningProb(double p) public double getProbGrow() public void setProbGrow(double p) } package cell.firesim; public class TreeCell extends FireSimCell{ public TreeCell(double pCatch, double pLight, double pGrow) public Cell nextState(List neighbors) } package cell.GOLsim; public class AliveCell extends GOLSimCell{ public AliveCell() public Cell nextState(List neighbors) } package cell.GOLsim; public class DeadCell extends GOLSimCell{ public DeadCell() public Cell nextState(List neighbors) } package cell.GOLsim; public abstract class GOLSimCell extends Cell { } package cell.segregation; public class EmptyCell extends SegregationSimCell{ public EmptyCell() public Cell nextState(List neighbors) public boolean isTaken() public void setTaken(boolean isTaken) } package cell.segregation; public class OCell extends SegregationSimCell{ public OCell(double t) public double getThreshold() public void setThreshold(double t) public Cell nextState(List neighbors) } package cell.segregation; public abstract class SegregationSimCell extends Cell{ } package cell.segregation; public class XCell extends SegregationSimCell{ public XCell(double t) public double getThreshold() public void setThreshold(double t) public Cell nextState(List neighbors) } package cell.sugarsim; public class AgentCell extends SugarSimCell{ public AgentCell(int i, int j, int patch_sugar, int max_sugar, int sugarGBR, int sugarGBI, int tick, int agent_s, int sM, int v) public void eatSugar() public void setVision(int v) public void setSugarMetabolism(int sM) public int getVision() public int getAgentSugar() public int getSugarMetabolism() public Cell nextState(List neighbors) } package cell.sugarsim; public class EmptyCell extends SugarSimCell{ public EmptyCell(int i, int j, int patch_sugar, int max_sugar, int sugarGBR, int sugarGBI, int tick) public Cell nextState(List neighbors) public boolean isOccupied() public void setOccupied(boolean isOccupied) } package cell.sugarsim; public abstract class SugarSimCell extends Cell{ public SugarSimCell(int i, int j, int patch_sugar, int max_sugar, int sugarGBR, int sugarGBI, int tick) public int getX() public int getY() public void setSugarGBR(int gbr) public void setSugarGRI(int gbi) public int getPatchSugar() public int getMaxSugar() public int getTick() public int getSugarGBR() public int getSugarGBI() } package cell.watorsim; public class EmptyCell extends WatorSimCell{ public EmptyCell(int x, int y) public EmptyCell(EmptyCell empty_cell) public Cell nextState(List neighbors) public boolean isOccupied() public void setOccupied(boolean isOccupied) public boolean isReproducing() public void resetReproduction() throws UnsupportedOperationException } package cell.watorsim; public class FishCell extends WatorSimCell{ public FishCell(int x, int y, int reproduction_threshold) public FishCell(FishCell fish_cell) public int getReproductionTime() public int getReproductionThreshold() public void setReproductionThreshold(double t) public Cell nextState(List neighbors) public boolean isEaten() public void setEaten(boolean isEaten) public boolean isReproducing() public void resetReproduction() } package cell.watorsim; public class SharkCell extends WatorSimCell{ public SharkCell(int x, int y, int reproduction_threshold, int current_energy, int gained_energy) public SharkCell(SharkCell shark_cell) public int getReproductionTime() public int getReproductionThreshold() public void setReproductionThreshold(double t) public int getEnergy() public int getGainedEnergy() public void setGainedEnergy(double e) public Cell nextState(List neighbors) public void gainEnergy() public boolean isReproducing() public void resetReproduction() } package cell.watorsim; public abstract class WatorSimCell extends Cell{ public WatorSimCell (int x, int y) public abstract boolean isReproducing(); public abstract void resetReproduction(); public int getX() public void setX(int x) public int getY() public void setY(int y) } package grid; public class FireSimGrid extends Grid { public FireSimGrid(int width, int height, String shape, String arrangement, String edge_type, String[][] cellArray, double probCatch, double probLightning, double probGrow) public Map getNumberOfCells() public String[][] getArray() public double getFireProb() public double getLightningProb() public double getProbGrow() public Map getCurrentParameters() public void setCurrentParameters(Map map) } package grid; public class GOLSimGrid extends Grid{ public GOLSimGrid(int width, int height, String shape, String arrangement, String edge_type, String[][] cellArray) public Map getNumberOfCells() public String[][] getArray() public Map getCurrentParameters() public void setCurrentParameters(Map map) } package grid; public abstract class Grid { public Grid (int width, int height, String shape, String arrangement, String edge_type) public String getNeighborArrangement() public String getEdgeType() public String getShape() public int getWidth() public int getHeight() public Grid (Cell[][] grid) public Cell[][] getCellArray() public Cell[][] updateGrid() public Color[][] getVisuals() public abstract Map getNumberOfCells(); public abstract String[][] getArray(); public abstract Map getCurrentParameters(); public abstract void setCurrentParameters(Map map); } package grid; public class Neighbors { public Neighbors(String shape, String arrangement, String edge_type, Grid grid) public void addNeighbors(List neighbors, Cell[][] grid, int i, int j) } package grid; public class SegregationSimGrid extends Grid{ public SegregationSimGrid(int width, int height, String shape, String arrangement, String edge_type, String[][] cellArray, double[][] threshold) public Cell[][] updateGrid() public Map getNumberOfCells() public String[][] getArray() public double[][] getThreshold() public Map getCurrentParameters() public void setCurrentParameters(Map map) } package grid; public class SugarSimGrid extends Grid{ public SugarSimGrid(int width, int height, String shape, String arrangement, String edge_type, String[][] cellArray, int[][] patch_sugar, int[][] max_sugar, int sugarGBR, int sugarGBI, int[][] tick, int[][] agent_sugar, int[][] sugarMetabolism, int[][] vision) public Cell[][] updateGrid() public Map getNumberOfCells() public String[][] getArray() public int[][] getPatchSugarArray() public int[][] getPatchMaxSugarArray() public int[][] getPatchTickArray() public int[][] getAgentSugarArray() public int[][] getAgentMetabolismArray() public int[][] getAgentVisionArray() public int getGrowRate() public int getGrowInterval() public Map getCurrentParameters() public void setCurrentParameters(Map map) } package grid; public class WatorSimGrid extends Grid{ public WatorSimGrid(int width, int height, String shape, String arrangement, String edge_type, String[][] cellArray, int[][] reproduction, int[][] energy, int[][] gained_energy) public Cell[][] updateGrid() public Map getNumberOfCells() public String[][] getArray() public int[][] getReproductionThreshold() public int[][] getCurrentEnergy() public int[][] getDefaultEnergy() public int[][] getReproductionTime() public int[][] getGainedEnergy() public Map getCurrentParameters() public void setCurrentParameters(Map map) } package gui; public class Manager extends Application { public void start(Stage stage) throws Exception public void callXMLreader(String file) public void callGOLXMLreader(String file) public void callSegXMLreader(String file) public void callSugarXMLreader(String file) public void callWatorXMLreader(String file) public void callFireXMLreader(String file) public Scene setupScene (int width, int height, Paint background, Grid cellArray) throws Exception public Scene setupMenu (int width, int height, Paint background, Stage stage) throws Exception public Button GenerateFileButton(Stage s) public ChoiceBox GenerateSimChoiceBox() public ChoiceBox GenerateNeighbourChoiceBox() public ChoiceBox GenerateEdgeChoiceBox() public ChoiceBox GenerateShapeChoiceBox() public Button GenerateSaveButton(Grid cellArray, int gridx, int gridy, int cellx, int celly) public Button GenerateMakerButton(Stage s) public Button GenerateGuideButton(Stage s) public Button GenButton(GridPane grid, String name, int x, int y) public Group CreateRoot(Grid gridarray, int width, int height) } package gui; public class Visualizer { public Group CreateRoot(Cell[][] cellArray, int width, int height) {//cell abstract class hasn't been created yet public Scene setupScene (int width, int height, Paint background, Cell[][] cellArray, int cell_width, int cell_height) throws Exception public Scene setupMenu (int width, int height, Paint background, Stage stage) throws Exception public Group CreateRoot(Cell[][] cellArray, int width, int height) //cell abstract class hasn't been created yet } package xml.makers; public class FireXMLmaker extends XMLmaker{ public FireXMLmaker(String file, String shape, String nT, String eT, int gx, int gy, int cx, int cy, double probFire, double probLightning, double probNewTree) throws FileNotFoundException, UnsupportedEncodingException public FireXMLmaker(FireSimGrid grid, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException } package xml.makers; public class GOLXMLmaker extends XMLmaker{ public GOLXMLmaker(String file, String shape, String nT, String eT, int gx, int gy, int cx, int cy, double probcell) throws FileNotFoundException, UnsupportedEncodingException public GOLXMLmaker(GOLSimGrid grid, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException } package xml.makers; public class SegXMLmaker extends XMLmaker{ public SegXMLmaker(String file, String shape, String nT, String eT, int gx, int gy, int cx, int cy, double probx, double probo, double thresh) throws FileNotFoundException, UnsupportedEncodingException public SegXMLmaker(SegregationSimGrid grid, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException } package xml.makers; public class SugarXMLmaker extends XMLmaker{ public SugarXMLmaker(String file, String shape, String nT, String eT, int gx, int gy, int cx, int cy, double aP) throws FileNotFoundException, UnsupportedEncodingException public SugarXMLmaker(SugarSimGrid grid, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException } package xml.makers; public class WatorXMLmaker extends XMLmaker{ public WatorXMLmaker(String file, String shape, String nT, String eT, int gx, int gy, int cx, int cy, double probFish, double probShark, int rtShark, int rtFish, int eShark, int geShark) throws FileNotFoundException, UnsupportedEncodingException public WatorXMLmaker(WatorSimGrid grid, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException } package xml.readers; public class FireXMLreader extends XMLreader{ public FireSimSetup read(String filename) } package xml.readers; public class GOLXMLreader extends XMLreader{ public GOLSimSetup read(String filename) } package xml.readers; public class SegregationXMLreader extends XMLreader { public SegregationSimSetup read(String filename) } package xml.readers; public class SugarXMLreader extends XMLreader { public SugarSimSetup read(String filename) } package xml.readers; public class WatorXMLreader extends XMLreader{ public WatorSimSetup read(String filename) } package xml.SimSetups; public class FireSimSetup extends SimulationSetup{ public FireSimSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, int gridX, int gridY, public FireSimSetup(SimulationSetup simSetup, String[][] typeArray, double fP, double lP, double eTP) public String[][] getArray() public double getFireProb() public double getLightningProb() public double getProbGrow() public void printInfo() } package xml.SimSetups; public class GOLSimSetup extends SimulationSetup{ public GOLSimSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, int gridX, int gridY, public GOLSimSetup(SimulationSetup simSetup, String[][] typeArray) public String[][] getArray() public void printInfo() } package xml.SimSetups; public class SegregationSimSetup extends SimulationSetup{ public SegregationSimSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, int gridX, int gridY, public SegregationSimSetup(SimulationSetup simSetup, String[][] typeArray, double[][] thresh) public String[][] getArray() public double[][] getThreshold() public void printInfo() } package xml.SimSetups; public class SugarSimSetup extends SimulationSetup{ public SugarSimSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, int gridX, int gridY, public SugarSimSetup(SimulationSetup simSetup, int gBI, int gBR, int[][]pSA, int[][] pMSA, int[][] tA, String[][] aA, int[][] aSA, int[][] aMA, int[][] aVA) public int getGrowBackInterval() public int getGrowBackRate() public int[][] getPatchSugarArray() public int[][] getPatchMaxSugarArray() public int[][] getPatchTickArray() public String[][] getAgentArray() public int[][] getAgentSugarArray() public int[][] getAgentMetabolismArray() public int[][] getAgentVisionArray() public void printInfo() } package xml.SimSetups; public class WatorSimSetup extends SimulationSetup{ public WatorSimSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, int gridX, int gridY, public WatorSimSetup(SimulationSetup simSetup, String[][] typeArray, int[][] rA, int[][] gEA, int[][] eA, int[][]cEA, int[][]cRA) public String[][] getArray() public int[][] getReproduction() public int[][] getGainedEnergy() public int[][] getEnergy() public int[][] getCurrentEnergy() public int[][] getCurrentReproduction() public void printInfo() } package xml; public class SimulationSetup { public SimulationSetup(String n, String t, String a, String s, String nT, String eT, int xSize, int ySize, public String getName() public String getTitle() public String getAuthor() public String getShape() public String getNeighbourType() public String getEdgeType() public int getCellX() public int getCellY() public int getGridX() public int getGridY() public void printInfo() } package xml; public class XMLmaker { public XMLmaker(String file, String simu, String t, String a, String s, String nT, String eT, int gx, int gy, int cx, int cy) throws FileNotFoundException, UnsupportedEncodingException public XMLmaker(String file, String simu, String t, String a) throws FileNotFoundException, UnsupportedEncodingException } package xml; public class XMLreader { public SimulationSetup read(String filename) }