public class GraphPolicy extends SvgXmlFile
Modifier and Type | Field and Description |
---|---|
static int |
AGENT_RADIUS |
static Color |
BLUE |
static String |
COLOR_BLUE |
static String |
COLOR_GREEN |
static Color |
COLOR_TEAM1_ZONE |
static Color |
COLOR_TEAM2_ZONE |
Document |
doc |
static Color |
GREEN |
Vector<Double> |
intervals |
static int |
LINE_WIDTH |
long |
maxTime |
long |
minTime |
static int |
NODE_RADIUS |
static String |
previewFile |
static String |
svgFile |
svgEnding
Constructor and Description |
---|
GraphPolicy(GraphSimulationVisualizationObserver graphSimulationVisualizationObserver) |
Modifier and Type | Method and Description |
---|---|
void |
create() |
void |
createFolder(String name) |
void |
createPreviewSvg()
Method creates preview-SVG when called; should be called at the end of
the match because it needs the number of SVGs created
|
Document |
createXML() |
void |
drawAgent(GraphSimulationAgentState ag,
Color agentColor,
int agx,
int agy) |
void |
drawEdge(GraphEdge e) |
void |
drawEdge(massim.competition2013.GraphPolicy.EdgeDummy e) |
int |
drawFirstTable(Vector<TeamState> teamsStates,
long width,
int currStep)
Draws a table containing the following information in the top right
corner: TeamName, Total Score, Step Score, Current Zone Value, Current
Achievement Points, Achievements
|
void |
drawFixedInformation(GraphSimulationWorldState state,
long width)
Draws the non-changing info regarding the right part (tables etc.)
|
void |
drawGraph(String string,
int sizeX,
int sizeY,
Vector<GraphNode> nodes,
Vector<GraphEdge> edges)
Draws the graph/topology
|
void |
drawNode(GraphNode n) |
int |
drawSecondTable(Vector<GraphSimulationAgentState> agents,
long width,
int yValue)
Draws name, role, current energy, max energy,current health, max health,
strength and vis range of agent in output "table"
|
void |
drawTargetLine(int x,
int y,
int x2,
int y2,
GraphSimulationAgentState ag,
String lastAction,
String lastActionResult,
Color agentColor) |
void |
drawZones(Collection<GraphNode> nodesIn,
Collection<massim.competition2013.GraphPolicy.EdgeDummy> edgesIn,
Color domColor,
String style) |
String |
getTeamOne() |
void |
listAchievements(int yValue,
long width,
Vector<TeamState> teamsStates) |
static String |
makeRGB(Color c)
Creates an rgb-string (for SVGs) from a Color object
|
void |
save(double internalWidth,
double internalHeight) |
void |
setTeamNames(Vector<String> teamNames2) |
generateXML, openFile, saveXML
public static String svgFile
public static String previewFile
public Document doc
public static final int NODE_RADIUS
public static final int AGENT_RADIUS
public static final int LINE_WIDTH
public static final Color GREEN
public static final Color BLUE
public static final Color COLOR_TEAM1_ZONE
public static final Color COLOR_TEAM2_ZONE
public static final String COLOR_GREEN
public static final String COLOR_BLUE
public long maxTime
public long minTime
public GraphPolicy(GraphSimulationVisualizationObserver graphSimulationVisualizationObserver)
public void create()
public void drawGraph(String string, int sizeX, int sizeY, Vector<GraphNode> nodes, Vector<GraphEdge> edges)
public void drawEdge(GraphEdge e)
public void drawEdge(massim.competition2013.GraphPolicy.EdgeDummy e)
public void drawNode(GraphNode n)
public void drawAgent(GraphSimulationAgentState ag, Color agentColor, int agx, int agy)
public void drawZones(Collection<GraphNode> nodesIn, Collection<massim.competition2013.GraphPolicy.EdgeDummy> edgesIn, Color domColor, String style)
public int drawFirstTable(Vector<TeamState> teamsStates, long width, int currStep)
teamsStates
- - the teams' statespublic int drawSecondTable(Vector<GraphSimulationAgentState> agents, long width, int yValue)
public void listAchievements(int yValue, long width, Vector<TeamState> teamsStates)
public void save(double internalWidth, double internalHeight)
public Document createXML()
public void createPreviewSvg()
public void createFolder(String name)
public String getTeamOne()
public void drawFixedInformation(GraphSimulationWorldState state, long width)
public void drawTargetLine(int x, int y, int x2, int y2, GraphSimulationAgentState ag, String lastAction, String lastActionResult, Color agentColor)
Copyright © 2013. All Rights Reserved.