public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static Edge |
generateRandomEdge(Graph graph,
boolean surveyed)
Generates a random edge
|
static Graph |
generateRandomGraph(int numberOfNodes,
int numberOfEdges,
boolean allSurveyed)
Generates a random graph.
|
static LinkedList<AgentToken> |
genereateRandomTokens(int numberOfTokens,
Graph g,
String team,
String state,
String role,
int energy,
int health,
int strength,
int visRange,
int lastInspection)
Generates tokens on graph g
|
static Edge |
getRandomEdge(Graph graph)
Gets a random edge of a graph
|
public static Graph generateRandomGraph(int numberOfNodes, int numberOfEdges, boolean allSurveyed)
numberOfNodes
- the number of nodes to generatenumberOfEdges
- the number of edges to generatepublic static Edge generateRandomEdge(Graph graph, boolean surveyed)
graph
- the graph the edge shall be created frompublic static Edge getRandomEdge(Graph graph)
graph
- the graph the edge shall be picked frompublic static LinkedList<AgentToken> genereateRandomTokens(int numberOfTokens, Graph g, String team, String state, String role, int energy, int health, int strength, int visRange, int lastInspection)
numberOfTokens
- number of tokens to be generatedg
- the graph on which the tokens will be placedteam
- the Team to which the tokens belongstate
- the state of the generated tokensrole
- the role of the generated tokensCopyright © 2013. All Rights Reserved.