Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i = 0; i < resourcesGained; i++)
- {
- var chance = game.Random.Next(1, totalProbability);
- bool goUp = chance < (totalProbability/2);
- var r = ((goUp) ? 0 : PossibleResources.Count);
- var increase = ((goUp) ? 1 : -1);
- for (; ((goUp)?r<PossibleResources.Count:r>0); r+=increase)
- {
- //Do mining logic.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement