public static Agent GetSuitableAgentForStandingPoint( StonePile usableMachine, StandingPoint standingPoint, IEnumerable <Agent> agents, List <Agent> usedAgents) { float num = float.MinValue; Agent agent1 = (Agent)null; foreach (Agent agent2 in agents) { if (StonePileAI.IsAgentAssignable(agent2) && !standingPoint.IsDisabledForAgent(agent2) && (double)standingPoint.GetUsageScoreForAgent(agent2) > (double)num) { num = standingPoint.GetUsageScoreForAgent(agent2); agent1 = agent2; } } return(agent1); }
public static Agent GetSuitableAgentForStandingPoint( StonePile stonePile, StandingPoint standingPoint, IEnumerable <AgentValuePair <float> > agents, List <Agent> usedAgents, float weight) { float num = float.MinValue; Agent agent1 = (Agent)null; foreach (AgentValuePair <float> agent2 in agents) { Agent agent3 = agent2.Agent; if (StonePileAI.IsAgentAssignable(agent3) && !standingPoint.IsDisabledForAgent(agent3) && (double)standingPoint.GetUsageScoreForAgent(agent3) > (double)num) { num = standingPoint.GetUsageScoreForAgent(agent3); agent1 = agent3; } } return(agent1); }
public StonePileAI(StonePile stonePile) : base((UsableMachine)stonePile) { }