diff --git a/nnfc.awk b/nnfc.awk index 4afa05b..c9cad27 100644 --- a/nnfc.awk +++ b/nnfc.awk @@ -1,5 +1,5 @@ # no-nonsense FreeCell in POSIX AWK -# run as: [n]awk -f nnfc.awk [-v ASCII=1] [-v MONOCHROME=1] [-v SEED=x] +# run as: [n]awk -f nnfc.awk [-v ASCII=1] [-v MONOCHROME=1] [-v SEED=x] [-v NAH=1] # commands: q - quit, u - undo, ah - autohome, h - help, # [number][number] - move from column/freecell to column/freecell/foundation: # - 0 is foundation (can be omitted) @@ -197,6 +197,7 @@ function help() { print "-v ASCII=1\tuse ASCII instead of Unicode suit chars" print "-v MONOCHROME=1\t don't use colors" print "-v SEED=xxxxx\tset game seed number (M$-compatible)" + print "-v NAH=1\tdisable autohoming after every move (use ah command for this)" print "Commands: q - quit, u - undo, ah - autohome, h - this help" print "Moves: [digit][digit], where \"digits\" are:" print "- 0 is foundation (can be omitted)" @@ -275,6 +276,7 @@ BEGIN { # main code part else { # pass the command to the logic function res = domove(cmd) if(res == 0) print "Invalid move!" + else if(NAH != 1 && res < 2) res = autohome() } render() if(res == 2) {print "Victory!"; break}