344
Gambling with Lain
(lemmy.nz)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Make it a bit more fun.
1 in 6 chance to trigger the logic.
The logic?
The slow deterioration, and random issues appearing that are tough to diagnose would be more fun than such wanton destruction.
The chance is actually 1 in 7 because both 0 and 6 are included in the
randInt()range.Oh right. I thought it might work the same as range etc in python, where is does one less than you specify.. Coming from, well every other language this really threw me off on my first python excursion.
You can get the exclusive behaviour with
random.randrange. (Relevant Stack Overflow question with a somewhat interesting answer)