public class Assignment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Agent> |
agents |
protected java.util.HashMap<Agent,java.util.ArrayList<Agent>> |
agentSeenBy |
protected java.util.HashMap<Agent,java.util.ArrayList<Agent>> |
agentSees |
protected double |
difficulty |
Constructor and Description |
---|
Assignment(java.util.AbstractList<Agent> agents,
double difficulty) |
Modifier and Type | Method and Description |
---|---|
double |
getDifficulty()
Return the difficulty of the assignment
|
java.util.ArrayList<Agent> |
getSpectated(Agent a)
This method gets a list all agents that can be seen by agent a
|
java.util.ArrayList<Agent> |
getSpectators(Agent a)
Gets a list of agents who can see agent a
|
void |
introduceAssignment(java.util.LinkedList<java.lang.String> story) |
int |
nrOfAgents()
Return the number of the agents in current assignment
|
protected double difficulty
protected java.util.ArrayList<Agent> agents
public Assignment(java.util.AbstractList<Agent> agents, double difficulty)
public double getDifficulty()
public java.util.ArrayList<Agent> getSpectated(Agent a)
a
- an Agent instance for which the visible agents need to be
returnedpublic java.util.ArrayList<Agent> getSpectators(Agent a)
a
- the Agent for whom to return spectatorspublic int nrOfAgents()
public void introduceAssignment(java.util.LinkedList<java.lang.String> story)