diff --git a/wordle b/wordle index cdbd257..846afab 100755 --- a/wordle +++ b/wordle @@ -65,8 +65,9 @@ function select_random_word() { function set_options() { declare -g BORDER=1 declare -g HARD_MODE=0 + declare -g STRICT_HARD_MODE=0 - while getopts "bw:Hh" OPT; do + while getopts "bw:HSh" OPT; do case "${OPT}" in b) BORDER=0 @@ -80,15 +81,30 @@ function set_options() { fi ;; H) - HARD_MODE=1 + HARD_MODE=1 ;; + S) + HARD_MODE=1 + STRICT_HARD_MODE=1 + ;; h) - exit # add help message + echo -e "Usage: [OPTIONS] +Play a game for Wordle +Options: + -b Toggle borderless mode + -w Set target word + -H Enable hard mode + -S Enable strict hard mode (Cannot reuse grey letters) + -h Show this help message and exit" + + exit ;; *) ;; esac done + + shift $((OPTIND - 1)) } function init_board() { @@ -161,7 +177,9 @@ function hard_mode_check() { declare GUESS=$1 for (( i=0; i