Beispiel #1
0
        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);
        }
Beispiel #2
0
 internal bool IsSolution(PuzzleState current)
 {
     return(current.Equals(solved));
 }