Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            var env = new TurnBasedEnvironment(0, 250, false);

            var terrainAgent = new TerrainAgent();

            env.Add(terrainAgent, "terrain");

            var patrolAgent = new PatrolAgent();

            env.Add(patrolAgent, "patrol");

            env.Memory.Add("Size", 15);

            env.Start();
        }
Exemplo n.º 2
0
        private static void Main(string[] args)
        {
            var env = new ConcurrentEnvironment();

            var terrainAgent = new TerrainAgent();

            env.Add(terrainAgent, "terrain");
            terrainAgent.Start();

            Thread.Sleep(100);

            var patrolAgent = new PatrolAgent();

            env.Add(patrolAgent, "patrol");
            patrolAgent.Start();

            env.WaitAll();
        }