aboutsummaryrefslogtreecommitdiff
path: root/utils/genmovecode.sh
blob: cf13441f78c2fb4f044e91d843c71603fe41ab84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

cc -DDEBUG h48_to_lst.c ../src/nissy.c -o h48_to_lst

gen() {
	for f in cubes/move_??_*.txt; do
		move="$(echo "$f" | sed 's/.*_// ; s/\.txt//')"
		printf '#define _move_cube_%s fastcube( \\\n    ' "$move"
		./h48_to_lst <"$f"
		printf ')\n'
	done
}

gen
rm -f h48_to_lst invert

Generated with cgit - Back to sebastiano.tronto.net