internal Plan RandomPlan(Type typeDesired) { CollectionOfCollections <Plan> plans = GetPlans(typeDesired); // TODO GetPlans should do null or zero-sized list, and you // should only have to check for one. if (plans == null || plans.Size() == 0) { return(null); } return(plans.Get(Common.Enviroment.Random.Next(plans.Size()))); }
internal Plan RandomPlan(Type typeDesired) { CollectionOfCollections <Plan> plans = GetPlans(typeDesired); // TODO GetPlans should do null or zero-sized list, and you // should only have to check for one. if (plans == null || plans.Size() == 0) { return(null); } int randnum = Common.Enviroment.Random.Next(plans.Size()); //[email protected] adds for debug return(plans.Get(randnum)); }