Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<int> GetRandomNumbers(int count)
- {
- int numOfBlocks = count;
- int randblockNum = 0;
- int iteration = 0;
- List<int> randBlocks = new List<int>();
- //numOfBlocks = Rand.Next(0, 4);
- while(iteration < numOfBlocks) {
- randblockNum = Rand.Next(0, 4);
- if (!randBlocks.Contains(randblockNum)) {
- randBlocks.Add(randblockNum);
- ++iteration;
- }
- }
- return randBlocks;
- }
Add Comment
Please, Sign In to add comment