package cell; public class AliveCell extends GameOfLifeCell{ public AliveCell(int index) public char getXMLChar() public Cell updateCell(Grid grid) public Color getColor() } package cell; public class AshCell extends FireCell{ public AshCell(int index) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class BlankCell extends RPSCell { public BlankCell(int index, int strength) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class BlueCell extends SegregationCell { public BlueCell(int index, double satisfaction) public Cell updateCell(Grid grid) public List addEmpty(List emptyCells) public Color getColor() public char getXMLChar() } package cell; public class BoyCell extends SugarScapeCell { public BoyCell(int index) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class BurningCell extends FireCell{ public BurningCell(int index) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public abstract class Cell { public abstract Cell updateCell(Grid grid); public void setIndex(int index) public abstract Color getColor(); public abstract char getXMLChar(); } package cell; public class DeadCell extends GameOfLifeCell{ public DeadCell(int index) public char getXMLChar() public Cell updateCell(Grid grid) public Color getColor() } package cell; public class EmptyCell extends SegregationCell { public EmptyCell(int index) public Cell updateCell(Grid grid) public List addEmpty(List emptyCells) public Color getColor() public char getXMLChar() } package cell; public abstract class FireCell extends Cell{ } package cell; public abstract class GameOfLifeCell extends Cell{ } package cell; public class GirlCell extends SugarScapeCell { public GirlCell(int index) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class InfertileCell extends SugarScapeCell { public InfertileCell(int sugar, int metabolism, int vision, int age, int deathAge) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class NeutralCell extends PredatorPreyCell { public NeutralCell(int index, double predatorDeathRate) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class PaperCell extends RPSCell { public PaperCell(int index, int strength) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class PredatorCell extends PredatorPreyCell { public PredatorCell(int index, double predatorDeathRate) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public abstract class PredatorPreyCell extends Cell { } package cell; public class PreyCell extends PredatorPreyCell { public PreyCell(int index, double predatorDeathRate) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public class RedCell extends SegregationCell { public RedCell(int index, double satisfaction) public Cell updateCell(Grid grid) public List addEmpty(List emptyCells) public Color getColor() public char getXMLChar() } package cell; public class RockCell extends RPSCell { public RockCell(int index, int strength) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public abstract class RPSCell extends Cell { } package cell; public class ScissorCell extends RPSCell { public ScissorCell(int index, int strength) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } package cell; public abstract class SegregationCell extends Cell { public abstract List addEmpty(List emptyCells); public void setIndex(int index) } package cell; public class SugarCell extends Cell { public SugarCell(int index, int maxSugar) public void updateAgent(Grid grid) public void resetAgent() public Cell updateCell(Grid grid) public Color getColor() public boolean hasAgent() public int getSugar() public SugarScapeCell getAgent() public void setAgent(SugarScapeCell cell) public char getXMLChar() } package cell; public abstract class SugarScapeCell extends Cell{ public SugarScapeCell(int index) public SugarScapeCell(int sugar, int metabolism, int vision, int age, int deathAge) } package cell; public class TreeCell extends FireCell{ public TreeCell(int index, double probcatch) public Cell updateCell(Grid grid) public Color getColor() public char getXMLChar() } public class CellSocietyMain extends Application{ public void start (Stage stage) } package grid; public class BoundedHexagonGrid extends Grid { public BoundedHexagonGrid(Grid grid) public BoundedHexagonGrid(int width, int height) public List getDirectNeighbors(int index, int vision) public List getAllNeighbors(int index) public Grid cloneGrid(Grid grid) public List getDirectNeighbors(int index) public String getShape() } package grid; public class BoundedSquareGrid extends Grid{ public BoundedSquareGrid(Grid grid) public BoundedSquareGrid(int width, int height) public List getDirectNeighbors(int index) public List getDirectNeighbors(int index, int vision) public List getAllNeighbors(int index) public Grid cloneGrid(Grid grid) public String getShape() } package grid; public abstract class Grid{ public Grid(int width, int height) public Grid(Grid grid) public Cell[][] getGrid() public int getSize() public void setGrid(Cell[][] grid) public int getHeight() public void setHeight(int height) public int getWidth() public void setWidth(int width) public int getXpos(int index) public int getYpos(int index) public Cell getCell(int index) public Cell getCell(int x, int y) public void setCell(Cell cell, int index) public void setCell(Cell cell, int x, int y) public abstract List getDirectNeighbors(int index); public abstract List getDirectNeighbors(int index, int vision); public abstract List getAllNeighbors(int index); public abstract Grid cloneGrid(Grid grid); public abstract String getShape(); } package grid; public class UnboundedHexagonGrid extends Grid{ public UnboundedHexagonGrid(Grid grid) public UnboundedHexagonGrid(int width, int height) public List getDirectNeighbors(int index, int vision) public List getAllNeighbors(int index) public Grid cloneGrid(Grid grid) public List getDirectNeighbors(int index) public String getShape() } package grid; public class UnboundedSquareGrid extends Grid{ public UnboundedSquareGrid(Grid grid) public UnboundedSquareGrid(int width, int height) public List getAllNeighbors(int index) public List getDirectNeighbors(int index) public List getDirectNeighbors(int index, int vision) public String getShape() public Grid cloneGrid(Grid grid) } package GUI; public class Display { public Display(ResourceBundle resources, ResourceBundle simResources) } package GUI; public class DisplayUpdater { public DisplayUpdater(ResourceBundle simResources, int width, int height) } package GUI; public class UserInterface { public UserInterface(Stage stage, String language) } package Simulation; public class FireSimulation extends Simulation { public FireSimulation(FireObject xmlObject) public Grid step(Grid grid) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public Cell makeCell(int index, char state) public double getProbcatch() public void setProbcatch(double probcatch) public XMLObject getXMLObject() } package Simulation; public class GameOfLifeSimulation extends Simulation { public GameOfLifeSimulation(XMLObject xmlObject) public Cell makeCell(int index, char state) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public XMLObject getXMLObject() } package Simulation; public class PredatorPreySimulation extends Simulation{ public PredatorPreySimulation(PredatorPreyObject xmlInfo) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public Cell makeCell(int index, char state) public Grid initialize(char[][] states) public XMLObject getXMLObject() } package Simulation; public class RPSSimulation extends Simulation { public RPSSimulation(XMLObject xmlObject) public Cell makeCell(int index, char state) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public XMLObject getXMLObject() } package Simulation; public class SegregationSimulation extends Simulation { public SegregationSimulation(SegregationObject xmlObject) public Cell makeCell(int index, char state) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public XMLObject getXMLObject() } package Simulation; public abstract class Simulation { public boolean checkXMLArray(char[][] states) public Grid initialize(char[][] states, XMLObject xmlInfo) public abstract boolean isIllegalCell(int index, char state); public abstract Grid updateGrid(Grid grid); public abstract XMLObject getXMLObject(); } package Simulation; public class SugarScapeSimulation extends Simulation { public SugarScapeSimulation(XMLObject xmlObject) public Cell makeCell(int index, char state) public SugarScapeCell makeAgent(int index, char state) public Grid initialize(char[][] states, XMLObject xmlInfo) public Grid updateGrid(Grid grid) public boolean isIllegalCell(int index, char state) public XMLObject getXMLObject() } package XML; public class FireObject extends XMLObject{ public FireObject(char[][] multiCharArray, int width, int length, String simulationType, String shape, double probcatch) public double getProbcatch() public void setProbcatch(double probcatch) } package XML; public class GameOfLifeObject extends XMLObject{ public GameOfLifeObject(char[][] multiCharArray, int width, int length, String simulationType, String shape) } package XML; public class PredatorPreyObject extends XMLObject{ public PredatorPreyObject(char[][] multiCharArray, int width, int length, String simulationType, String shape, double predatorDeathRate) public double getPredatorDeathRate() public void setPredatorDeathRate(double predatorDeathRate) } package XML; public class RPSObject extends XMLObject{ public RPSObject(char[][] multiCharArray, int width, int length, String simulationType, String shape) } package XML; public class SegregationObject extends XMLObject{ public SegregationObject(char[][] multiCharArray, int width, int length, String simulationType, String shape, double satisfaction) public double getSatisfaction() public void setSatisfaction(double satisfaction) } package XML; public class SugarScapeObject extends XMLObject{ public SugarScapeObject(char[][] multiCharArray, int width, int length, String simulationType, String shape, char[][] agentArray) public char[][] getAgentCharArray() public void setAgentCharArray(char[][] agentArray) } package XML; * This code was based on Robert Duvall's XMLException example. The code within the XML package was modified to suit the needs of the project. public class XMLException extends RuntimeException { public XMLException (String message, Object ... values) public XMLException (Throwable cause, String message, Object ... values) public XMLException (Throwable cause) } package XML; public class XMLObject { public XMLObject(char[][] multiCharArray, int width, int length, String simulationType, String shape) public char[][] getMultiCharArray() public void setMultiCharArray(char[][] multiCharArray) public int getWidth() public void setWidth(int width) public int getLength() public void setLength(int length) public String getSimulationType() public void setSimulationType(String simulationType) public String getShape() public void setShape(String shape) } package XML; public class XMLParser { public XMLParser () public XMLObject setupFileChooser(String simulationType) public void showAlertMessage(String simulationType, String alertMessage) public XMLObject createXMLObject(File dataFile) } package XML; public class XMLWriter { public XMLWriter (XMLObject xmlObject, Grid currgrid) }