Beispiel #1
0
        private void InitializeWorld()
        {
            Nest nest = new Nest();

            nest.Position = world.Center;
            world.Add(nest);

            for (int i = 0; i < 75; i++)
            {
                Ant ant = new Ant(nest);
                ant.Rotation = world.Random() * Math.PI * 2;
                ant.Position = nest.Position;
                world.Add(ant);
            }
            SpawnSomeFood();
        }
Beispiel #2
0
 public Ant(Nest nest)
 {
     this.nest = nest;
 }