From 5e71fa247d53d628e111fcb2cf0f2b33bf167df7 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 29 Oct 2023 12:06:09 +0100 Subject: Added practice --- Makefile | 1 + practice | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 practice diff --git a/Makefile b/Makefile index 962c945..53af945 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ SCRIPTS = addressgrep \ popup-cal12 \ popup-cal3 \ popup-terminal \ + practice \ secret \ sel \ share \ diff --git a/practice b/practice new file mode 100755 index 0000000..5daa4b5 --- /dev/null +++ b/practice @@ -0,0 +1,34 @@ +#!/bin/sh + +# Script based on nissy (see https://nissy.tronto.net) to practice FMC + +# Usage: practice [htr] + +usage() { + echo "Usage: practice [htr]" +} + +htr() { + while true; do + scr="$(nissy scramble dr)" + echo "$scr" + read -r x + nissy solve -o htr "$scr" + read -r x + done +} + +if [ -z "$1" ]; then + usage + exit 1 +fi + +case "$1" in + htr) + htr + ;; + *) + usage + exit 1 + ;; +esac -- cgit v1.3