Пример #1
0
 public Level(List<Person> people, List<FriendshipLink> friendships, GameStrategy strategy)
 {
     this.people = people;
     this.friendships = friendships;
     this.strategy = strategy;
     this.numAlive = people.Count;
     this.numDead = 0;
     this.awareness = 0;
 }
Пример #2
0
        public Level GenerateLevel(int numPeople, int avgFriends, float probability, float radius, GameStrategy strategy)
        {
            this.numPeople = numPeople;
            this.avgConnections = avgFriends;
            this.probability = probability;
            this.radius = radius;

            List<Person> people = CreatePeople();
            List<FriendshipLink> friendships = CreateFriendships(people);

            return new Level(people, friendships, strategy);
        }
Пример #3
0
 public Level NewLevel(int numPeople, int avgFriends, float probability, float radius, GameStrategy strategy)
 {
     return level = gen.GenerateLevel(numPeople, avgFriends, probability, radius, strategy);
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     str = strategy;
 }