List<AgentCutaway> IAgentFunctions.agentsInRange(ref AgentEnv client) { //Returns list of Agents Cutaways of observable agents Coordinates obs = client.getCoord(); List<AgentCutaway> rez = new List<AgentCutaway>(); foreach (AgentEnv ag in agentListm) { if (ag.getTypeName() == AgentType.Finder && client.getTypeName() == AgentType.Finder && canCommunicate(client, ag)) { rez.Add(ag.getCutaway()); } else if ((ag.getCoord() - obs).norm() < client.getViewRadius() && canSee(obs, ag.getCoord()) && ag.getID() != client.getID()) { rez.Add(ag.getCutaway()); } } return rez; }
List<Wall> IAgentFunctions.wallsAround(ref AgentEnv agent) { // Returns List of observable walls return wallList.wallsAroundPoint(agent.getCoord(), agent.getViewRadius()); }