package XML; public class Reader { public Reader()xmlDocument = null;} public boolean setUpFile(File xml) public String getFilename() public GeneralParameters readGeneral() public WaTorParameters readCell_WaTor() public FireParameters readCell_Fire() public SegregationParameters readCell_Segregation() public LangstonsLoopsParameters readCell_LangstonsLoops() public AntsParameters readCell_Ants() public RockPaperScissorsParameters readCell_RockPaperScissors() } package Simulator.UI; public class Simulation { public Simulation(String type, int r, int c, double xpos, double ypos, double size, Reader xmlFile) } package Simulator.UI; public class GUI { public GUI(Stage stage) throws FileNotFoundException public Group getMyRoot() } package Simulator; public class Cell_Segregation extends Cell{ public Cell_Segregation(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void calcNextState(List possibleNeighbors) public double likeNeighborsPercentageOf(List possibleNeighbors) public void updateEmptyCellsList(List allCells) public int getRandomIndex(List list) public void applyNextState() public void setNextState(String state) public void setState(String state) public String getState() public String getNextState() public List getNeighborsToroidal(List allCells, int numCols, int numRows) public void onClick() public void filterNeighbors(List possibleNeighbors) public void filterNeighbors(ArrayList possibleNeighbors) } package Simulator; public class Cell_GameOfLife extends Cell{ public Cell_GameOfLife(int row, int col, int numRows, int numCols, double simulationWidth, Reader xml) public int liveNeighborsNumber(List possibleNeighbors) public void calcNextState(List possibleNeighbors) public void applyNextState() public void onClick() public void filterNeighbors(List possibleNeighbors) public int getRow() public int getCol() public void setNextState(String state) public void setState(String state) public String getState() public String getNextState() } package Simulator; public class Cell_WaTor extends Cell { public Cell_WaTor(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void calcNextState(List possibleNeighbors) public void applyNextState() public void onClick() //the order of toggle here is FISH-SHARK-NONE-FISH.... public void filterNeighbors(List possibleNeighbors) } package Simulator; public class Cell_Fire extends Cell{ public Cell_Fire(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void calcNextState(List possibleNeighbors) public void setNextState(String state) public void applyNextState() public void onClick() //our order of toggle is TREE-BURN-NONE-TREE.... public void filterNeighbors(List possibleNeighbors) } package Simulator; public class Main extends Application { public void start(Stage stage) throws FileNotFoundException } package Simulator; public class Cell_LangstonsLoops extends Cell { public Cell_LangstonsLoops(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void extendAffect(List possibleNeighbors) public void cornerAffect(List possibleNeighbors) public void calcNextState(List possibleNeighbors) public boolean[] neighborLayouts(List possibleNeighbors) public void move(List possibleNeighbors, boolean[] neighborLocations) public void moveToNeighbor(List possibleNeighbors, int col, int row, String newState) public void setNeighbor(List possibleNeighbors, int col, int row, String State) public void applyNextState() public void onClick() public void filterNeighbors(List possibleNeighbors) public void setNextState(String state) public void setState(String state) public String getState() public String getNextState() } package Simulator; public abstract class Cell { public Cell(int row, int col, double dimension, Reader xml) public void setState(String state)myState = state;} public void setNextState(String state)myNextState = state;} public String getState()return myState;} public String getNextState()return myNextState;} public abstract void calcNextState(List possibleNeighbors); //pass in the 8 cells around cell public abstract void applyNextState(); //update the current stat public abstract void onClick(); //toggles state when clicked public abstract void filterNeighbors(List possibleNeighbors); public Polygon getImage()return image;} public void setColor(Paint color) public List getNeighborsToroidal(List allCells, int numCols, int numRows) public List getNeighborsFinite(List allCells, int numCols, int numRows) public int getRow()return row;} public int getCol() return col;} } package Simulator; public class Cell_Ants extends Cell{ public Cell_Ants(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void colorShape() public void fillFood(List possibleNeighbors) public void decayPheromones() public void calcNextState(List possibleNeighbors) public Cell_Ants homePheromoneOrientation(List possibleNeighbors) public Cell_Ants foodPheromoneOrientation(List possibleNeighbors) public int[] goToOrientation(List possibleNeighbors,Cell_Ants orientation) public void returnToNest(List possibleNeighbors) public void findFoodSource(List possibleNeighbors) public Cell_Ants moveToNeighbor(List possibleNeighbors, int col, int row, String newState) public void dropHomePheromones() public void dropFoodPheromones() public Cell getRandomNeighbor(List possibleNeighbors) public int getRandomIndex(List list) public void applyNextState() public void setNextState(String state) public void setState(String state) public String getState() public String getNextState() public List getNeighbors(Cell[][] allCells) public void onClick() public void filterNeighbors(List possibleNeighbors) } package Simulator; public class Cell_RockPaperScissors extends Cell{ public Cell_RockPaperScissors(int row, int col, int totalRows, double totalColumns, double simulationWidth, Reader xml) public void calcNextState(List possibleNeighbors) public void colorShape() public HashMap countNeighbors(List possibleNeighbors) public int similarNeighborsNumber(List possibleNeighbors) public String maxNeighbor(HashMap map) public Cell getRandomNeighbor(List possibleNeighbors) public int getRandomIndex(List list) public void applyNextState() public void setNextState(String state) public void setState(String state) public String getState() public String getNextState() public void onClick() public void filterNeighbors(List possibleNeighbors) } package Parameters; public class AntsParameters { public AntsParameters(String val) public int getHiveDiameter() public HashMap getParameters() } package Parameters; public class RockPaperScissorsParameters { public RockPaperScissorsParameters(String val) public int getPower() public HashMap getParameters() } package Parameters; public class SegregationParameters { public SegregationParameters(String val) public HashMap getParameters() public double getTolerance() } package Parameters; public class FireParameters { public FireParameters(String burn, String probCatch) public int burnDuration()return burnDuration;} public double probCatch()return probCatch;} public HashMap getParameters() } package Parameters; public class GameOfLifeParameters { public HashMap getParameters() } package Parameters; public class WaTorParameters { public WaTorParameters(String fertility, String energy, String fish, String shark) public int getFertilityLimit() public int getEnergyLimit() public double getPercentFish() public double getPercentShark() public HashMap getParameters() } package Parameters; public class LangstonsLoopsParameters { public LangstonsLoopsParameters(String val) public HashMap getParameters() public int getNumExtenders() } package Parameters; public class GeneralParameters { public GeneralParameters(String r, String c, String t, String n, String a, String d, String ne, String stroke, String shape) public String getShape()return shape;} public Boolean getStroke() return strokeOn;} public String getNeighborType()return neighborType;} public String getDescription()return description;} public String getName() public String getAuthor() public int getRow()return row;} public int getCol() return col;} public String getType() return type;} }