public void BigListTest() { var list = Enumerable.Range(1, 1000).ToList(); var original = new List <int>(list); var rs = new ReversibleShuffle(list.Count); rs.Apply(list); Console.WriteLine(string.Join(",", list)); rs.Undo(list); Console.WriteLine(string.Join(",", list)); Assert.IsTrue(Enumerable.SequenceEqual(original, list)); }
public override void Apply(GameState gs) { _shuffle = new ReversibleShuffle(gs.Libraries[gs.Players.IndexOf(Player)].Size); _shuffle.Apply(gs.Libraries[gs.Players.IndexOf(Player)].Objects); }