예제 #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();
        }
예제 #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();
        }
예제 #3
0
 public void SetOwner(TerrainAgent a)
 {
     _ownerAgent = a;
 }
예제 #4
0
 public void SetOwner(TerrainAgent a)
 {
     _ownerAgent = a;
     _size       = a.Environment.Memory["Size"];
 }