chiark / gitweb /
Revise the Flood preset list.
authorSimon Tatham <anakin@pobox.com>
Tue, 13 Jan 2015 19:31:29 +0000 (19:31 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 13 Jan 2015 19:31:29 +0000 (19:31 +0000)
The ones I started with were a bit under-varied and over-orthogonal.
Get rid of some of the more pointless things like 16x16 with lots of
extra moves, and add some with different colour counts. While I'm
here, make the menu descriptions nicer.

flood.c

diff --git a/flood.c b/flood.c
index 42dc56ecf40b4d0dc58781fcce2748bf9bbe5d43..1a01316fbf953cfb8f57a7e0ef8af4193f6197f7 100644 (file)
--- a/flood.c
+++ b/flood.c
@@ -80,30 +80,36 @@ static game_params *default_params(void)
     return ret;
 }
 
-static const struct game_params flood_presets[] = {
-    {12, 12, 6, 5},
-    {12, 12, 6, 2},
-    {12, 12, 6, 0},
-    {16, 16, 6, 5},
-    {16, 16, 6, 2},
-    {16, 16, 6, 0},
+static const struct {
+    struct game_params preset;
+    const char *name;
+} flood_presets[] = {
+    /* Default 12x12 size, three difficulty levels. */
+    {{12, 12, 6, 5}, "12x12 Easy"},
+    {{12, 12, 6, 2}, "12x12 Medium"},
+    {{12, 12, 6, 0}, "12x12 Hard"},
+    /* Larger puzzles, leaving off Easy in the expectation that people
+     * wanting a bigger grid will have played it enough to find Easy
+     * easy. */
+    {{16, 16, 6, 2}, "16x16 Medium"},
+    {{16, 16, 6, 0}, "16x16 Hard"},
+    /* A couple of different colour counts. It seems generally not too
+     * hard with fewer colours (probably because fewer choices), so no
+     * extra moves for these modes. */
+    {{12, 12, 3, 0}, "12x12, 3 colours"},
+    {{12, 12, 4, 0}, "12x12, 4 colours"},
 };
 
 static int game_fetch_preset(int i, char **name, game_params **params)
 {
     game_params *ret;
-    char str[80];
 
     if (i < 0 || i >= lenof(flood_presets))
         return FALSE;
 
     ret = snew(game_params);
-    *ret = flood_presets[i];
-
-    sprintf(str, "%dx%d, %d colours, %d extra moves",
-            ret->w, ret->h, ret->colours, ret->leniency);
-
-    *name = dupstr(str);
+    *ret = flood_presets[i].preset;
+    *name = dupstr(flood_presets[i].name);
     *params = ret;
     return TRUE;
 }