board_play_in_eye(): Fix ko detection
[pachi/t.git] / t-regress / test-game.sh
blob0b117b0b025413c8d45751a93aa94d1c7c6b0b3a
1 #!/bin/sh
3 # test-game: Run testcases within a single game
5 # Usage: test-game FILENAME
7 # Examine a game record and run testcases for all moves described
8 # in the "game comment".
10 sgf="$1"
12 sed -ne '/GC\[/,/\]/{ s/.*GC\[//; s/\].*//; p; }' <"$sgf" |
13 while read moven cases desc; do
14 echo "Examining move $moven"; sleep 1
15 tools/sgf2gtp.pl -g -n $((moven-1)) <"$sgf" | ./pachi -t =20000
16 echo "Testcases: $cases"
17 echo "Confirm and press enter..."; read xx </dev/tty
18 done