[gnome-mines] Hint time penalty now increases



commit 0e37331b1c8e4c0e723a971c1b2f33c129687b3f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Jan 20 22:06:56 2014 -0600

    Hint time penalty now increases
    
    The initial hint costs 10s as before. But each successive hint will cost
    10s more than the last, to a max of 60s.
    
    These constants aren't really playtested beyond the observation that a
    flat 10s is much too low.

 src/minefield.vala |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/minefield.vala b/src/minefield.vala
index 62117f9..505c7aa 100644
--- a/src/minefield.vala
+++ b/src/minefield.vala
@@ -89,6 +89,11 @@ public class Minefield
     private Timer? clock;
     private uint clock_timeout;
 
+    /* Time penalty for a hint increases the more you use it */
+    private static const uint HINT_TIME_PENALTY_MAX = 90;
+    private static const uint HINT_TIME_PENALTY_INCREASE = 10;
+    private uint hint_time_penalty_seconds = 10;
+
     public double elapsed
     {
         get
@@ -321,7 +326,9 @@ public class Minefield
 
         /* There is a ten second penalty for accepting a hint_action. */
         clear_mine (x, y);
-        clock_elapsed += 10.0;
+        clock_elapsed += hint_time_penalty_seconds;
+        if (hint_time_penalty_seconds < HINT_TIME_PENALTY_MAX)
+            hint_time_penalty_seconds += HINT_TIME_PENALTY_INCREASE;
         tick ();
     }
 


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