[Coco] Minesweeper

Mark McDougall msmcdoug at iinet.net.au
Tue Feb 7 04:01:45 EST 2006


Neil Morrison wrote:

> This is MUCH quicker than shifting. In effect, you have 52 flags.

No, this is exactly the problem as described by the OP.

If you need 45 random values from 52, this method quickly becomes slower 
and slower as you approach the 45th random value, as it's more and more 
likely that you keep hitting a value already taken.

Regards,
Mark




More information about the Coco mailing list