From: Miriam Ruiz Date: Sun, 30 Nov 2008 17:24:55 +0000 (+0100) Subject: Patch the game to show better than par punctuation X-Git-Url: https://repo.or.cz/w/hex-a-hop.git/commitdiff_plain/334f08cbf0c562112a025b07211be0995bb9c584 Patch the game to show better than par punctuation Copyright (C) 2007 Sam Hocevar --- diff --git a/hex_puzzzle.cpp b/hex_puzzzle.cpp index 21a7968..7b82eec 100644 --- a/hex_puzzzle.cpp +++ b/hex_puzzzle.cpp @@ -2151,7 +2151,7 @@ struct HexPuzzle : public State int par = GetPar(x); if (progress.general.scoringOn && l->PassesPar( par )) - t = 4; + t = l->BeatsPar( par ) ? 40 : 4; } if (recurse) return t; diff --git a/savestate.h b/savestate.h index 0851f41..a49c37d 100644 --- a/savestate.h +++ b/savestate.h @@ -88,6 +88,12 @@ public: return score <= bestScore; } + bool BeatsPar(int par) + { + if (!Completed()) + return false; + return bestScore < par; + } bool PassesPar(int par) { if (!Completed())