From 870e03f2c08de14fb889d8815919eab69bb6e415 Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 4 Jan 2019 20:15:28 +0100 Subject: [PATCH] remove interactive key help --- README.md | 3 ++- sol.c | 8 ++++---- sol.h | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4dfecfb..75d3de6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ play klondike and spider solitaire in your unicode terminal. cards, only print `.overlap` lines of the ends, and `1` line for the middle cards * TODO: screen size > stack height => rendering issues! - * TODO: online (key-)help `?`, `-h`, `-v` * TODO: suggest moves (`h` => hint) ### P4 * TODO: scores, variants: draw 3, max. n overturns @@ -43,6 +42,8 @@ play klondike and spider solitaire in your unicode terminal. * DONE: sigint, sigcont handler! atexit() to avoid inconsistent term state * DONE: hjkl keyboard mode * DONE: more vim mode keys (first/last tableu) + * DONE: online (key-)help `?`, `-h`, `-v` (NOTE: implemented -h, rest deemed + not usedul) ## Notes diff --git a/sol.c b/sol.c index 132f140..e0dd5e8 100644 --- a/sol.c +++ b/sol.c @@ -157,7 +157,6 @@ int sol(void) { } break; case CMD_HINT: //TODO: show a possible (and sensible) move - case CMD_HELP: //TODO: display keyhelp case CMD_JOIN: //TODO: join any pile to here case CMD_INVAL: visbell(); break; case CMD_NEW: return GAME_NEW; @@ -529,8 +528,8 @@ from_l: print_table(&active, &inactive); case 'n': return CMD_NEW; //TODO: should be : command case 'r': return CMD_AGAIN; //TODO: should be : command case 'J': return CMD_JOIN; - case 'K': return CMD_HINT; - case '?': return CMD_HELP; + case 'K': /* fallthrough */ + case '?': return CMD_HINT; case EOF: return CMD_NONE; /* sent by SIGCONT */ default: return CMD_INVAL; } @@ -552,7 +551,8 @@ to_l: print_table(&active, &inactive); case ' ': *to = active.pile; break; /* continues with the foundation/empty tableu check */ - case 'K': return CMD_HELP; + case 'K': /* fallthrough */ + case '?': return CMD_HINT; case 'G'&0x1f: return CMD_NONE; /* cancel move with ^G */ case EOF: return CMD_NONE; /* sent by SIGCONT */ default: diff --git a/sol.h b/sol.h index 0f7d47d..cf756c1 100644 --- a/sol.h +++ b/sol.h @@ -119,7 +119,6 @@ enum special_cmds { CMD_NEW, CMD_AGAIN, CMD_HINT, - CMD_HELP, CMD_JOIN, }; -- 2.39.3