Randomize() never rolls a 6

The value passed to arc4random_uniform() should be 6, since the call returns a value between 0 and less than the value passed in.

Yep, I found the same thing. :slight_smile:

The function arc4random_uniform() is not available in Xcode 7.

Any ideas?

[quote=“NerdyBerty”]The function arc4random_uniform() is not available in Xcode 7.

Any ideas?[/quote]

It is, Xcode just doesn’t autocomplete it unfortunately.

That’s why the writer adds 1 to "arc4random_uniform(5) :wink:

That’s why the writer adds 1 to "arc4random_uniform(5) :wink:[/quote]

Which is still wrong, since “arc4random_uniform” only uses values strictly less than its parameter! 5 is never chosen (only 0…4), so 5 + 1 = 6 never bubbles up. I made the same fix as the OP.