[Coco] Minesweeper
Neil Morrison
neilsmorr at hotpop.com
Tue Feb 7 13:14:27 EST 2006
In fact if you try it you will find it works OK. Shifting is much more
expensive in time. Any added optimisations probably cost more than they
save.
----- Original Message -----
From: "Mark McDougall" <msmcdoug at iinet.net.au>
> 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.
More information about the Coco
mailing list