コード例 #1
0
ファイル: Solution.cs プロジェクト: ryanclarke/PegGame
        private Path BackOutIfDeadend(Path path)
        {
            while (PathIndex >= Board.Paths.Count - 1)
            {
                Answer[CurrentJump] = string.Empty;
                PathIndexes[CurrentJump] = 0;

                CurrentJump--;

                PathIndex = PathIndexes[CurrentJump];
                path = Board.Paths[PathIndex];
                path.ReverseJump();

                Answer[CurrentJump] = string.Empty;
                PathIndexes[CurrentJump] = 0;
            }
            return path;
        }