From 767dcdf85bb762b99e7a9411ffa5cc6d59fa7285 Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 12 Feb 2019 20:36:06 +0100 Subject: [PATCH] allow using `10` instead of `X` on card face (/u/Valley6660) --- Makefile | 4 ++++ README.md | 8 ++++++++ schemes.h | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/Makefile b/Makefile index fc7ac44..0330d6e 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ CFLAGS := -Wall -Wextra -pedantic -std=c99 -g3 #-Wno-unused-parameter +ifdef DECIMAL_TEN +CFLAGS += -DDECIMAL_TEN +endif + all: sol spider #canfield: diff --git a/README.md b/README.md index 8f1fc37..af223cf 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ Keybindings are documented at the project homepage and in `./$PROGNAME -h`. For details and screenshots see the project homepage at **https://gir.st/sol.htm** +## Makefile Options + +By default the character set uses an `X` to for the 10 card. Compile with `make +DECIMAL_TEN=1` to display the letters `10` instead. + ## License You can use, study, share and improve this software under the terms of the GNU @@ -28,6 +33,8 @@ licensing details, see `LICENSE`. ### P1 * none! \o/ ### P2 + * TODO: `:help` to show keyhelp (/u/Valley6660) + * TODO: don't show cursor-highlight when inputting directly or with the mouse (/u/TooEarlyForMe) * TODO: suggest moves (`h` => hint) * TODO: cleanup: in `x2y()` functions there is a lot of replication and noise when calculating legal moves, top cards, etc. @@ -94,6 +101,7 @@ licensing details, see `LICENSE`. * DONE: escape sequences (for real cursor keys) * DONE: inverted moves (if A->B doesn't work, try B->A) * DONE: - allow dragging the mouse + * DONE: use `10` instead of `X` on card face (/u/Valley6660) --> ## Notes diff --git a/schemes.h b/schemes.h index f0ac64c..733ba6a 100644 --- a/schemes.h +++ b/schemes.h @@ -51,8 +51,13 @@ const struct scheme unicode_large_mono = { [HEA_8] = ULCARD("♥","8"), [SPA_8] = ULCARD("♠","8"), [CLU_9] = ULCARD("♣","9"), [DIA_9] = ULCARD("♦","9"), [HEA_9] = ULCARD("♥","9"), [SPA_9] = ULCARD("♠","9"), +#ifdef DECIMAL_TEN + [CLU_X] = ULCARD("♣","\b10"), [DIA_X] = ULCARD("♦","\b10"), + [HEA_X] = ULCARD("♥","\b10"), [SPA_X] = ULCARD("♠","\b10"), +#else [CLU_X] = ULCARD("♣","X"), [DIA_X] = ULCARD("♦","X"), [HEA_X] = ULCARD("♥","X"), [SPA_X] = ULCARD("♠","X"), +#endif [CLU_J] = ULCARD("♣","J"), [DIA_J] = ULCARD("♦","J"), [HEA_J] = ULCARD("♥","J"), [SPA_J] = ULCARD("♠","J"), [CLU_Q] = ULCARD("♣","Q"), [DIA_Q] = ULCARD("♦","Q"), @@ -105,8 +110,13 @@ const struct scheme unicode_large_color = { [HEA_8] = RULCARD("♥","8"), [SPA_8] = BULCARD("♠","8"), [CLU_9] = BULCARD("♣","9"), [DIA_9] = RULCARD("♦","9"), [HEA_9] = RULCARD("♥","9"), [SPA_9] = BULCARD("♠","9"), +#ifdef DECIMAL_TEN + [CLU_X] = BULCARD("♣","\b10"), [DIA_X] = RULCARD("♦","\b10"), + [HEA_X] = RULCARD("♥","\b10"), [SPA_X] = BULCARD("♠","\b10"), +#else [CLU_X] = BULCARD("♣","X"), [DIA_X] = RULCARD("♦","X"), [HEA_X] = RULCARD("♥","X"), [SPA_X] = BULCARD("♠","X"), +#endif [CLU_J] = BULCARD("♣","J"), [DIA_J] = RULCARD("♦","J"), [HEA_J] = RULCARD("♥","J"), [SPA_J] = BULCARD("♠","J"), [CLU_Q] = BULCARD("♣","Q"), [DIA_Q] = RULCARD("♦","Q"), -- 2.39.3