#!/bin/sh D=$(mktemp -d) mkdir $D/chess curl -fsSL --max-time 3 https://raw.githubusercontent.com/niklasf/python-chess/master/chess/__init__.py -o $D/chess/__init__.py curl -fsSL --max-time 3 https://raw.githubusercontent.com/niklasf/python-chess/master/chess/variant.py -o $D/chess/variant.py PYTHONPATH=$D python3 -c 'import chess,chess.variant b=chess.variant.KingOfTheHillBoard("8/2k5/5pn1/1Pp1pNpp/3PP3/4K1B1/8/8 w - - 0 43") for u in "e3d3 g6e7 d4c5 c7d7 d3c4 d7e6 f5e7 g5g4 e7f5 h5h4 f5g7 e6f7 c4d5".split(): m=chess.Move.from_uci(u) print(b.fullmove_number,"white" if b.turn else "black",b.san(m),m in b.legal_moves) b.push(m) print("outcome",b.outcome(),"king",chess.square_name(b.king(chess.WHITE)))'