public class Contestant extends AgentImplementation
currentVote, eliminated, mole, nameString, ponderings, secondOrderBelief, suspicions, typeString
Constructor and Description |
---|
Contestant() |
Contestant(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
decideVote()
Makes the agent decide its vote.
|
boolean |
doAssignment(Assignment ass)
This function lets an Agent participate in an assignment
|
void |
informAssResult(boolean success,
java.util.ArrayList<Agent> triedList,
java.util.ArrayList<Agent> sabotagedList)
AssignmentEvent tells the agent what she sees
|
void |
informElimination(Agent loser)
EliminationEvent tells Agent who is eliminated through this method.
|
void |
informGameEnd(int nrOfLeftAgent)
Round or EliminateEvent inform every player that the game is end.
|
void |
listenConversation(Agent speaker,
Agent suspicion)
ConversationEvent tells Agent who is the mole.
|
addCompetitor, addCompetitors, avgSuspicion, clearSecondOrderBelief, eliminate, getMaxSuspiciousAgents, getName, getNumberOfCompetitors, getPonderings, getSuspicions, getTypeString, isEliminated, isMole, normalizeSuspicions, ponder, setName, setTypeString, summedSuspicion, tellConversation, toString, updateSuspicion, updateView, vote
public Contestant()
public Contestant(java.lang.String name)
protected void decideVote()
AgentImplementation
decideVote
in class AgentImplementation
public void listenConversation(Agent speaker, Agent suspicion)
Agent
listenConversation
in interface Agent
listenConversation
in class AgentImplementation
speaker
- the agent who gives the informationsuspicion
- the suspicion which speaker tells listenerpublic boolean doAssignment(Assignment ass)
ass
- the Assignment to performpublic void informAssResult(boolean success, java.util.ArrayList<Agent> triedList, java.util.ArrayList<Agent> sabotagedList)
Agent
success
- The result of the assignmenttriedList
- The agents who try her's bestsabotagedList
- The agents who sabotagedpublic void informElimination(Agent loser)
Agent
loser
- the agent who is eliminated from the gamepublic void informGameEnd(int nrOfLeftAgent)
Agent
nrOfLeftAgent
- tell the agent how many agents left in the game