shithub: puzzles

Download patch

ref: b94be41445d1ed056882c15795f01a6861fc184b
parent: 47bc27b0c228fbbac5be8547e4aa6bb58767a75e
author: Jonas Kölker <jonaskoelker@yahoo.com>
date: Fri Oct 2 14:23:44 EDT 2015

Render Filling presets as 'WxH', not 'HxW'.

--- a/filling.c
+++ b/filling.c
@@ -91,7 +91,7 @@
  *****************************************************************************/
 
 struct game_params {
-    int h, w;
+    int w, h;
 };
 
 struct shared_state {
@@ -106,7 +106,9 @@
     int completed, cheated;
 };
 
-static const struct game_params filling_defaults[3] = {{7, 9}, {9, 13}, {13, 17}};
+static const struct game_params filling_defaults[3] = {
+    {9, 7}, {13, 9}, {17, 13}
+};
 
 static game_params *default_params(void)
 {
@@ -124,7 +126,7 @@
     if (i < 0 || i >= lenof(filling_defaults)) return FALSE;
     *params = snew(game_params);
     **params = filling_defaults[i]; /* struct copy */
-    sprintf(buf, "%dx%d", filling_defaults[i].h, filling_defaults[i].w);
+    sprintf(buf, "%dx%d", filling_defaults[i].w, filling_defaults[i].h);
     *name = dupstr(buf);
 
     return TRUE;