[gnome-sudoku] DifficultyCategory.from_string() - Accept older categories also



commit 758f7988af0712dda8d822e2c9c1866a6c02ec4b
Author: Parin Porecha <parinporecha gmail com>
Date:   Thu Aug 14 16:11:31 2014 +0200

    DifficultyCategory.from_string() - Accept older categories also

 lib/sudoku-board.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/lib/sudoku-board.vala b/lib/sudoku-board.vala
index b752a77..db82bb5 100644
--- a/lib/sudoku-board.vala
+++ b/lib/sudoku-board.vala
@@ -568,6 +568,14 @@ public enum DifficultyCategory {
                 return INTERMEDIATE;
             case "Expert Difficulty":
                 return EXPERT;
+
+            // Backward compatibility
+            case "Medium Difficulty":
+                return EASY;
+            case "Hard Difficulty":
+                return INTERMEDIATE;
+            case "Very Hard Difficulty":
+                return EXPERT;
             default:
                 assert_not_reached ();
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]