chiark / gitweb /
Make the `hold marker' in Guess accessible from the keyboard (`H' key, for want
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Thu, 23 Jun 2005 22:01:17 +0000 (22:01 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Thu, 23 Jun 2005 22:01:17 +0000 (22:01 +0000)
of a better idea).

[originally from svn r6004]

guess.c
puzzles.but

diff --git a/guess.c b/guess.c
index 3e5d120ffdde538736557dde28dab3002cffe91a..3a53f4bec867fecda9958bd52eca68e32ec419b3 100644 (file)
--- a/guess.c
+++ b/guess.c
@@ -684,6 +684,9 @@ static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds,
             set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1);
             ret = from;
         }
+    } else if (button == 'H' || button == 'h') {
+        ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur];
+        ret = from;
     }
     return ret;
 }
index 17d100344d0b2f8e7285ff4520dcbb97033552bf..42964ff5171a78ecdabef3f5d487c661b4a39c0c 100644 (file)
@@ -1076,7 +1076,7 @@ after marking.
 Alternatively, with the keyboard, the up and down cursor keys can be
 used to select a peg colour, the left and right keys to select a
 peg position, and the space bar to place a peg of the selected colour
-in the chosen position.
+in the chosen position. \q{H} adds a hold marker.
 
 When the guess is complete, the feedback pegs will be highlighted;
 clicking on these (or moving the peg cursor to them with the arrow keys