Patch the game to show better than par punctuation
authorMiriam Ruiz <miriam@debian.org>
Sun, 30 Nov 2008 17:24:55 +0000 (30 18:24 +0100)
committerMiriam Ruiz <miriam@debian.org>
Sun, 30 Nov 2008 17:24:55 +0000 (30 18:24 +0100)
Copyright (C) 2007  Sam Hocevar <sam+deb@zoy.org>

hex_puzzzle.cpp
savestate.h

index 21a7968..7b82eec 100644 (file)
@@ -2151,7 +2151,7 @@ struct HexPuzzle : public State
 \r
                        int par = GetPar(x);\r
                        if (progress.general.scoringOn && l->PassesPar( par ))\r
-                               t = 4;\r
+                               t = l->BeatsPar( par ) ? 40 : 4;\r
                }\r
                if (recurse) \r
                        return t;\r
index 0851f41..a49c37d 100644 (file)
@@ -88,6 +88,12 @@ public:
 \r
                return score <= bestScore;\r
        }\r
+       bool BeatsPar(int par)\r
+       {\r
+               if (!Completed())\r
+                       return false;\r
+               return bestScore < par;\r
+       }\r
        bool PassesPar(int par)\r
        {\r
                if (!Completed())\r