aboutsummaryrefslogtreecommitdiff
path: root/utils/genmoveswitch.sh
blob: 30cf0680e48d5ec20e0b69e797bdf5518af67b9f (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

printf '\tswitch (m) {\n'
for f in cubse/move_??_*.txt; do
	t="$(echo $f | sed 's/.*_// ; s/\.txt//')"
	printf '\tcase %s:\n\t\treturn _move(%s, c);\n' "$t" "$t"
done
printf '\t}\n'

Generated with cgit - Back to sebastiano.tronto.net