aboutsummaryrefslogtreecommitdiff
path: root/utils/genmovecode.sh
blob: daf268efe7dcdb3730117873fb3377e556a36f58 (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/cube.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