nnfc

No-nonsense FreeCell game
git clone git://git.luxferre.top/nnfc.git
Log | Files | Refs

commit 1434e6d3a2fe470ab291dce3b55c2ebe551d7dc5
parent 4401ed7dde997733bc4ccfba18b860b775e74df1
Author: Luxferre <lux@ferre>
Date:   Thu, 18 Jan 2024 12:09:06 +0200

Improved compatibility with gawk --posix

Diffstat:
Mnnfc.awk | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/nnfc.awk b/nnfc.awk @@ -288,13 +288,13 @@ BEGIN { # main code part } fc_deal = fc_lstate # save the deal number asplit("A 2 3 4 5 6 7 8 9 T J Q K", cvals, " ") # card values - suits[0] = ASCII ? "c" : "\xe2\x99\xa3" # clubs - suits[1] = ASCII ? "d" : "\xe2\x99\xa6" # diamonds - suits[2] = ASCII ? "h" : "\xe2\x99\xa5" # hearts - suits[3] = ASCII ? "s" : "\xe2\x99\xa0" # spades - cstart[0] = MONOCHROME ? "" : "\x1b[31m" # red - cstart[1] = MONOCHROME ? "" : "\x1b[37m" # black (white) - cend = MONOCHROME ? "" : "\x1b[39m" # reset color + suits[0] = ASCII ? "c" : "\342\231\243" # clubs + suits[1] = ASCII ? "d" : "\342\231\246" # diamonds + suits[2] = ASCII ? "h" : "\342\231\245" # hearts + suits[3] = ASCII ? "s" : "\342\231\240" # spades + cstart[0] = MONOCHROME ? "" : "\033[31m" # red + cstart[1] = MONOCHROME ? "" : "\033[37m" # black (white) + cend = MONOCHROME ? "" : "\033[39m" # reset color split("", usedinds) # init used indices cache split("", cardstr) # init card strings array (exactly 3 char long each) for(i=0;i<52;i++) { # populate it