Beispiel #1
0
        private static void Main(string[] args)
        {
            var env = new EnvironmentMas(noTurns: 100, parallel: false);
            var a1  = new MyAgent1(); env.Add(a1, "agent1");
            var a2  = new MyAgent2(); env.Add(a2, "agent2");

            env.Start();
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            // === Init ===

            var env = new ConcurrentEnvironment();
            var a1  = new MyAgent1(); env.Add(a1, "agent1");
            var a2  = new MyAgent2(); env.Add(a2, "agent2");

            // === Run ===

            a1.Start(); a2.Start();

            // === Wait ===

            env.WaitAll();
        }