Exemple #1
0
        public static void RandomWalkZombo(Zombo toWalk)
        {
            var options = PointHelper.EmptyPointsAroundPoint(toWalk.location);

            if (options.Any())
            {
                var moveTo = ListHelper.RandomElementInEnumerable(options);
                EntityControl.MoveZomboTo(toWalk, moveTo);
            }
        }
 static void DuplicateCheck(Zombo check)
 {
     if (check.FoodCount >= FoodToCopy[check.zomboType])
     {
         var possiblePoints = PointHelper.EmptyPointsAroundPoint(check.location);
         if (possiblePoints.Count() == 8)
         {
             EntityControl.DuplicateZomboAt(check, ListHelper.RandomElementInEnumerable(possiblePoints));
             check.FoodCount -= FoodToCopy[check.zomboType];
         }
     }
 }