aboutsummaryrefslogtreecommitdiff
path: root/practice
blob: 090aae85270423250d93531005d91b96c90350f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

# Script based on nissy (see https://nissy.tronto.net) to practice FMC

# Usage: practice [htr|fin]

usage() {
	echo "Usage: practice [htr|fin]"
}

htr() {
	while true; do
		scr="$(nissy scramble dr)"
		echo "$scr"
		read -r x
		nissy solve -o htr "$scr"
		read -r x
	done
}

fin() {
	while true; do
		scr="$(nissy scramble htr)"
		echo "$scr"
		read -r x
		nissy solve -o drudslice "$scr"
		read -r x
	done
}

if [ -z "$1" ]; then
	usage
	exit 1
fi

case "$1" in
	htr)
		htr
		;;
	fin)
		fin
		;;
	*)
		usage
		exit 1
		;;
esac

Generated with cgit - Back to sebastiano.tronto.net