Exemplo n.º 1
0
        public static string PrintResult(ISudokuResult sudokuResult)
        {
            var stringResult = new StringBuilder();

            stringResult.Append(PrintMatrix(sudokuResult.Data));
            stringResult.AppendLine(PrintLevel(sudokuResult));

            return(stringResult.ToString());
        }
Exemplo n.º 2
0
        private static string PrintLevel(ISudokuResult result)
        {
            var resultString = new StringBuilder();

            resultString.AppendFormat(Resources.PrintHelper_PrintLevel_Level, (int)result.Level, result.Level);
            resultString.AppendLine();
            resultString.AppendFormat(Resources.PrintHelper_PrintLevel_Score, result.ComplexitiesScore);
            resultString.AppendLine();
            return(resultString.ToString());
        }
Exemplo n.º 3
0
 public bool IsMaxLimitExceeded(ISudokuResult result)
 {
     return(GetLevelByBackTracks(result.BackTrackCount) > Level);
 }
Exemplo n.º 4
0
 internal static ESudokuLevel GetLevel(ISudokuResult result)
 {
     return(result.HasUniqueSolution ?
            GetLevelByBackTracks(result.BackTrackCount) :
            ESudokuLevel.None);
 }
Exemplo n.º 5
0
 public bool IsMatching(ISudokuResult result)
 {
     return(GetLevel(result) == Level);
 }