Exemplo n.º 1
0
    static void Main(string [] args)
    {
        Agency agency = new Agency();
        Agent x = new Agent();
        Agent y = new Agent();
        Agent z = new Agent();
        agency.onCall.addAgent(x);
        agency.onCall.addAgent(y);
        agency.onCall.addAgent(z);
        while (true) {
            agency.display();
            foreach (Agent a in agency.onCall.agentList) {
                agency.field.agentList.Add(a);
            }
            foreach (Agent a in agency.field.agentList) {
                agency.onCall.agentList.Remove(a);
            }

            agency.turn();
            Console.ReadLine();
        }
    }