package UI; public class GridUISquare extends GridUI { public GridUISquare(Grid grid, ResourceBundle resource) } package UI; var packageName = "rule."; Class clazz = Class.forName(packageName + simulationType + className); public class UIManager { * by calling the method public void create(). public UIManager(Stage stage) public void create() public static void showWarningPopup(String message) } package UI; public class GridUITriangle extends GridUI { public GridUITriangle(Grid grid, ResourceBundle resource) } package UI; public abstract class GridUI { public GridUI(Grid grid, ResourceBundle resource) public void updateAppearance() public List getMyNodes() return myNodes; } } package UI; public class GridUIHexagon extends GridUI { public GridUIHexagon(Grid grid, ResourceBundle resource) } package simulation; public class Grid { public Grid(ReadXML reader, String gridType, String cellShape) public List getAllNeighbors(int row, int col) public List getDirectNeighbors(int row, int col) public List getAllNeighborsSquare(int row, int col) public List getDirectNeighborsSquare(int row, int col) public List getAllNeighborsHexagon(int row, int col) public List getDirectNeighborsHexagon(int row, int col) public List getAllNeighborsTriangle(int row, int col) public List getDirectNeighborsTriangle(int row, int col) public int getNumRow() return myNumRow; } public int getNumCol() return myNumCol; } public Cell item(int i, int j) return myCells[i][j]; } public boolean isOutOfBounds(int i, int j) return i < 0 || i >= myNumRow || j < 0 || j >= myNumRow; } public int getStateCount(int state) } package simulation; public class ReadXML { public ReadXML (File file) public List getExtraParameters() public String getName()return name;} public int getRow()return row;} public int getColumn()return column;} public String getAuthor() public String getDescription() public int[][] getCellState()return cellState;} public String getMyParameters() return "The extra parameters are " + myParameters.toString(); } } package controller; public class CA extends Application { public void start(Stage stage) } package rule; public class SegregationRule extends Rule { public SegregationRule(Grid grid, List extraParameters) public void determineNextStates() } package rule; public class SpreadingOfFireRule extends Rule { public SpreadingOfFireRule(Grid grid, List extraParameters) public void determineNextStates() } package rule; public class AntRule extends Rule { public AntRule(Grid grid, List extraParameters) public void initialiseAnts() public void determineNextStates() public void antsMoveAndDropPheromones() public void antReturnToNest(AntForageAnt ant) public void dropHomePheromones(AntCell currentCell,List neighbors) public void dropFoodPheromones(AntCell currentCell, List neighbors) public int determineNewOrientation(Cell cell, AntForageAnt ant) public List forwardLocations(AntForageAnt ant) public void antFindFoodSource(AntForageAnt ant) public void pheromonesEvaporateAndDiffuse() } package rule; public class WatorRule extends Rule { public WatorRule(Grid grid, List extraParameters) public void determineNextStates() } package rule; public class LoopRule extends Rule { public LoopRule(Grid grid, List extraParameters) public void determineNextStates() } package rule; public abstract class Rule { public final static Random rand = new Random(); public Rule (Grid grid, List extraParameters) public void updateGrid() public abstract void determineNextStates(); public Map getStateMap() } package rule; public class GameOfLifeRule extends Rule { public GameOfLifeRule(Grid grid, List extraParameters) public void determineNextStates() } package rule; public class RockPaperScissorRule extends Rule { public RockPaperScissorRule(Grid grid, List extraParameters) public void determineNextStates() } package cell; public class AntForageAnt{ public AntForageAnt(int rowIndex, int colIndex) public int getOrientation() public void setOrientation(int i) public boolean getHaveFood() public void changeHaveFood() public int getrowIndex() public int getcolIndex() public void setrowIndex(int x) public void setcolIndex(int y) } package cell; public class SegregationCell extends Cell { public SegregationCell(int state, int i, int j) } package cell; public class AntCell extends Cell { public AntCell(int state, int i, int j) public double getFoodPheromones() public void setFoodPheromones(double d) public double getNestPheromones() public void setNestPheromones(double d) } package cell; public class SpreadingOfFireCell extends Cell { public SpreadingOfFireCell(int state, int i, int j) public int getBurningTime() public void setBurningTime(int time) } package cell; public class WatorCell extends Cell { public WatorCell(int state, int i, int j) public int getSurviveTime() public void setSurviveTime(int time) } package cell; public class RockPaperScissorCell extends Cell { public RockPaperScissorCell(int state, int i, int j) public boolean beats(Cell other) } package cell; public class GameOfLifeCell extends Cell { public GameOfLifeCell(int state, int i, int j) } package cell; public abstract class Cell { public Cell(int state, int i, int j) public int getNextState() public void setNextState(int state) myNextState = state; } public int getState() return myState; } public void setState(int state) myState = state; } public void updateToNextState() myState = myNextState; } public int getRowIndex() return rowIndex; } public int getColIndex() return colIndex; } public double getOpacity() return myOpacity; } // NEW CODE public void setOpacity(double value) myOpacity = value; } // NEW CODE } package cell; public class LoopCell extends Cell { public LoopCell(int state, int i, int j) public void setDirection(int dir) myDirection = dir; } public int getDirection() return myDirection; } }