[libgames-support] Reorder



commit 30da2ea48d76461455e3a3749bfe0b66aa961c49
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Feb 14 14:35:55 2016 -0600

    Reorder

 games/scores/context.vala |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/games/scores/context.vala b/games/scores/context.vala
index 4679f5d..9225191 100644
--- a/games/scores/context.vala
+++ b/games/scores/context.vala
@@ -177,6 +177,25 @@ public class Context : Object
         return result;
     }
 
+    private bool is_high_score (long score_value, Category category)
+    {
+        var best_scores = get_high_scores (category);
+
+        /* The given category doesn't yet exist and thus this score would be the first score and hence a 
high score. */
+        if (best_scores == null)
+            return true;
+
+        if (best_scores.size < 10)
+            return true;
+
+        var lowest = best_scores  get (9).score;
+
+        if (style == Style.PLAIN_ASCENDING || style == Style.TIME_ASCENDING)
+            return score_value < lowest;
+
+        return score_value > lowest;
+    }
+
     private async void save_score_to_file (Score score, Category category, Cancellable? cancellable) throws 
Error
     {
         if (DirUtils.create_with_parents (user_score_dir, 0766) == -1)
@@ -314,25 +333,6 @@ public class Context : Object
         }
     }
 
-    private bool is_high_score (long score_value, Category category)
-    {
-        var best_scores = get_high_scores (category);
-
-        /* The given category doesn't yet exist and thus this score would be the first score and hence a 
high score. */
-        if (best_scores == null)
-            return true;
-
-        if (best_scores.size < 10)
-            return true;
-
-        var lowest = best_scores  get (9).score;
-
-        if (style == Style.PLAIN_ASCENDING || style == Style.TIME_ASCENDING)
-            return score_value < lowest;
-
-        return score_value > lowest;
-    }
-
     internal void run_dialog_internal (Score? new_high_score)
         requires (game_window != null)
     {


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