public static Puzzle TutorialPuzzleOne(PuzzleState initial) { var solved = initial.Flip(new Move(0, Side.Right)); Level level = Level.TutorialLevel(solved, new int[] { 1 }, 1); return(new Puzzle(level, initial)); }
public List <Move> ReCreatePath(PuzzleState from, PuzzleState to, int max = 100) { if (!Contains(from)) { return(null); } List <Move> moves = new List <Move>(); while (!from.Equals(to) && max > 0) { Move move = new Move(); GetExtra(from, out move); moves.Add(move); from = from.Flip(move); max--; } return(moves); }
public PuzzleState Apply(Move move) { return(cc = cc.Flip(move)); }