public class TeamState extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
ACHIEVEMENT_PONITS_SCALE |
Vector<Achievement> |
achievements |
List<DominatedArea> |
areas |
HashMap<String,String> |
buyTransactions |
long |
currAchievementPoints |
String |
name |
Vector<Achievement> |
newAchievements |
HashMap<String,String> |
newBuyTransactions |
int |
ranking |
long |
summedScore |
int |
teamIdx |
long |
usedAchievementPoints |
Modifier and Type | Method and Description |
---|---|
boolean |
addInspectedAgent(GraphSimulationAgentState agent) |
boolean |
addInspectedAgent(String agentName) |
boolean |
addProbedNodes(GraphNode node) |
boolean |
addProbedNodes(String nodeName) |
boolean |
addSurveyedEdge(GraphEdge e) |
void |
calculateNewAchievements()
Checks if the teams has reached new achievements, marks them as reached,
and increases the current achievementPoints accordingly.
|
void |
clearBuyingTransactions() |
Vector<String> |
getAchieved()
Returns a vector with the name of the achievements that the team obtained
during the whole simulation.
|
long |
getAreasValue()
Returns the summed score of all the dominated areas.
|
long |
getAreaValue(DominatedArea area)
Returns the value of the area given as parameter.
|
long |
getAreaValue(GraphSimulationAgentState agent)
Returns the value of the dominated area of which the agent given as parameter is part.
|
long |
getCurrent()
Returns the current step-score (that is, the score that depends only on the current status of the world,
and that should be added to the total team score in every step).
|
Vector<String> |
getNewlyAchieved()
Returns a vector with the name of the achievements that the team obtained
during the last simulation step.
|
HashMap<String,String> |
getNewlyBought()
Returns a HashMap that stores for each agent the buying transaction it did during the last simulation step.
|
Set<String> |
getProbedNodes() |
void |
initAchievements(Vector<Achievement> configAchievements) |
void |
successfullAttack() |
void |
successfullParry() |
void |
sumCurrent()
Sums the step score to the total score.
|
boolean |
useAchievementPoints(long points) |
public static final int ACHIEVEMENT_PONITS_SCALE
public String name
public int teamIdx
public int ranking
public long summedScore
public long currAchievementPoints
public long usedAchievementPoints
public List<DominatedArea> areas
public Vector<Achievement> achievements
public Vector<Achievement> newAchievements
public TeamState(String name, int teamIdx)
public void sumCurrent()
public long getCurrent()
public long getAreasValue()
public long getAreaValue(DominatedArea area)
area
- public long getAreaValue(GraphSimulationAgentState agent)
agent
- public boolean useAchievementPoints(long points)
public void calculateNewAchievements()
public Vector<String> getAchieved()
Vector<String>
containing the names.public Vector<String> getNewlyAchieved()
Vector<String>
containing the names.public HashMap<String,String> getNewlyBought()
HashMap<String,String>
containing the agent names and the buying transactions per agent.
The first String describes the agent, the second the item that was bought.public void successfullAttack()
public void successfullParry()
public boolean addSurveyedEdge(GraphEdge e)
public boolean addProbedNodes(String nodeName)
public boolean addInspectedAgent(String agentName)
public boolean addProbedNodes(GraphNode node)
public boolean addInspectedAgent(GraphSimulationAgentState agent)
public void initAchievements(Vector<Achievement> configAchievements)
public void clearBuyingTransactions()
Copyright © 2013. All Rights Reserved.