shithub: puzzles

Download patch

ref: d781db11dd7cc3fd6b059bec4657297e5b6b0ae4
parent: f862a227beeed5476d09cd67573996258bca5d19
author: Simon Tatham <anakin@pobox.com>
date: Thu Jun 23 08:21:14 EDT 2005

Two small fixes: add some ceil() calls to stop the puzzle shrinking
every time I press N, and revert the help topic to NULL until some
documentation materialises.

[originally from svn r5993]

--- a/guess.c
+++ b/guess.c
@@ -639,9 +639,8 @@
     ds->pegrad  = (ds->pegsz -1)/2; /* radius of peg to fit in pegsz (which is 2r+1) */
     ds->hintrad = (ds->hintsz-1)/2;
 
-    *x = (int)((double)ds->pegsz * hmul);
-    *y = (int)((double)ds->pegsz * vmul);
-
+    *x = (int)ceil((double)ds->pegsz * hmul);
+    *y = (int)ceil((double)ds->pegsz * vmul);
     ds->w = *x; ds->h = *y;
 
     colh = ((ds->pegsz + ds->gapsz) * params->ncolours) - ds->gapsz;
@@ -1043,7 +1042,7 @@
 #endif
 
 const struct game thegame = {
-    "Guess", "games.guess",
+    "Guess", NULL,
     default_params,
     game_fetch_preset,
     decode_params,