On Sunday, 9 August 2015 at 15:30:32 UTC, Reflexive wrote:
I wrote import std.algorithm.remove ;, and I dont have any
longer any error. But, it dont want to remove the item. Here is
the source, the problem is in the shuffle() method :
...
Why not just use std.random.shuffle [1]?
import std.random;
void shuffle() {
randomShuffle(this.sabotarray);
}
(Also, this is more of a style opinion, but please don't define
all your variables up front; define them when they're first used.
The other way IMO has too much cognitive load, and you can't use
`auto` in many cases)
[1]: http://dlang.org/phobos/std_random.html#.randomShuffle