public class GraphPolicy extends SvgXmlFile
Modifier and Type | Field and Description |
---|---|
static int |
AGENT_RADIUS |
static Color |
BLUE |
static Color |
BRIGHTER_GRAY |
static String |
COLOR_BLUE |
static String |
COLOR_BRIGHTER_GRAY |
static String |
COLOR_DARKER_GRAY |
static String |
COLOR_GRAY |
static String |
COLOR_GREEN |
static Color |
COLOR_TEAM1_ZONE |
static Color |
COLOR_TEAM2_ZONE |
static Color |
DARKER_GRAY |
Document |
doc |
static Color |
GRAY |
static Color |
GREEN |
Vector<Double> |
intervals |
static int |
LINE_WIDTH |
long |
maxTime |
long |
minTime |
static int |
NODE_RADIUS |
static String |
previewFile |
static String |
svgFile |
static String |
TEAM1_ZONE |
static String |
TEAM2_ZONE |
svgEnding
Constructor and Description |
---|
GraphPolicy() |
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.competition2012.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 y)
Draws name, role, current energy, max energy,current health,
max health, strength and vis range of agent in output "table"
|
void |
drawZones(Collection<GraphNode> nodesIn,
Collection<massim.competition2012.GraphPolicy.EdgeDummy> edgesIn,
Color domColor,
String style) |
String |
getTeamOne() |
void |
listAchievements(int y,
long width,
Vector<TeamState> teamsStates) |
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 GRAY
public static final Color DARKER_GRAY
public static final Color BRIGHTER_GRAY
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 static final String COLOR_GRAY
public static final String COLOR_DARKER_GRAY
public static final String COLOR_BRIGHTER_GRAY
public static final String TEAM1_ZONE
public static final String TEAM2_ZONE
public long maxTime
public long minTime
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.competition2012.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.competition2012.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 y)
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)
Copyright © 2013. All Rights Reserved.