|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmassim.competition2012.scenario.TeamState
public class TeamState
This class holds information about the current state of a Team, including current score, zones built, achievement points, achievements, etc.
Field Summary | |
---|---|
static int |
ACHIEVEMENT_PONITS_SCALE
|
java.util.Vector<Achievement> |
achievements
|
java.util.List<DominatedArea> |
areas
|
long |
currAchievementPoints
|
java.lang.String |
name
|
java.util.Vector<Achievement> |
newAchievements
|
int |
ranking
|
long |
summedScore
|
int |
teamIdx
|
long |
usedAchievementPoints
|
Constructor Summary | |
---|---|
TeamState(java.lang.String name,
int teamIdx)
|
Method Summary | |
---|---|
boolean |
addInspectedAgent(GraphSimulationAgentState agent)
|
boolean |
addInspectedAgent(java.lang.String agentName)
|
boolean |
addProbedNodes(GraphNode node)
|
boolean |
addProbedNodes(java.lang.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. |
java.util.Vector<java.lang.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). |
java.util.Vector<java.lang.String> |
getNewlyAchieved()
Returns a vector with the name of the achievements that the team obtained during the last simulation step. |
java.util.Set<java.lang.String> |
getProbedNodes()
|
void |
initAchievements(java.util.Vector<Achievement> configAchievements)
|
void |
succsefullAttack()
|
void |
succsefullParry()
|
void |
sumCurrent()
Sums the step score to the total score. |
boolean |
useAchievementPoints(long points)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACHIEVEMENT_PONITS_SCALE
public java.lang.String name
public int teamIdx
public int ranking
public long summedScore
public long currAchievementPoints
public long usedAchievementPoints
public java.util.List<DominatedArea> areas
public java.util.Vector<Achievement> achievements
public java.util.Vector<Achievement> newAchievements
Constructor Detail |
---|
public TeamState(java.lang.String name, int teamIdx)
Method Detail |
---|
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 java.util.Vector<java.lang.String> getAchieved()
Vector<String>
containing the names.public java.util.Vector<java.lang.String> getNewlyAchieved()
Vector<String>
containing the names.public void succsefullAttack()
public void succsefullParry()
public boolean addSurveyedEdge(GraphEdge e)
public boolean addProbedNodes(java.lang.String nodeName)
public boolean addInspectedAgent(java.lang.String agentName)
public boolean addProbedNodes(GraphNode node)
public java.util.Set<java.lang.String> getProbedNodes()
public boolean addInspectedAgent(GraphSimulationAgentState agent)
public void initAchievements(java.util.Vector<Achievement> configAchievements)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |