legacy code retreat's triva game : the D version

marcpmichel marc.p.michel at gmail.com
Fri Dec 20 08:20:42 PST 2013


On Friday, 20 December 2013 at 15:05:07 UTC, bearophile wrote:
> marcpmichel:
>
>> Here is the ugly thing :
>> https://github.com/jbrains/trivia/tree/master/d
>
> And wrong:
>
>> if (rand.front() % 9 == 7) {
>
> Bye,
> bearophile

Do you mean I should have used :
if (uniform(0,10) == 7) {
instead ?


More information about the Digitalmars-d-announce mailing list