示例#1
0
文件: Puzzle.cs 项目: seuribe/flip
        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));
        }
示例#2
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);
        }
示例#3
0
文件: GameState.cs 项目: seuribe/flip
 public PuzzleState Apply(Move move)
 {
     return(cc = cc.Flip(move));
 }