예제 #1
0
        private string solveResultErrorMessage(PuzzleSolver.SolveResult result)
        {
            switch (result)
            {
            case PuzzleSolver.SolveResult.NoSolutionFound:
                return("No unique solution found.");

            case PuzzleSolver.SolveResult.NoSolutionExists:
                return("This puzzle has no solution.");

            case PuzzleSolver.SolveResult.MultipleSolutions:
                return("This puzzle has multiple solutions.");

            case PuzzleSolver.SolveResult.NoLogicSolution:
                return("This puzzle has a unique solution, but can't be solved without guessing.");

            case PuzzleSolver.SolveResult.EditorModeConflict:
                return("Editor mode conflict.");

            default:
                return(null);
            }
        }
예제 #2
0
 public PuzzleSolverDto(PuzzleSolver.SolveResult solveResult, List <long> elapsedMilliseconds)
 {
     this.SolveResult         = solveResult;
     this.ElapsedMilliseconds = elapsedMilliseconds;
 }
예제 #3
0
 public PuzzleSolverDto(PuzzleSolver.SolveResult solveResult)
     : this(solveResult, new List <long> {
     0
 })
 {
 }