Interact with ChessGuardian — a live chess platform with Stockfish AI.
Set the base URL in the environment or default to:
CHESSGUARDIAN_URL=https://chessguardian-production.up.railway.app
POST /api/live/start
Body: {"mode": "ai"} or {"mode": "pvp"}
Returns: {id, fen, history, lastMove}
GET /api/live/<game_id>
Returns: {id, fen, history, status, turn, winChance, gameOver}
POST /api/live/<game_id>/move
Body: {"move": "e5"} (SAN or UCI format)
Returns: {fen, history, stockfishMove, analysis, gameOver, status}
GET /api/live/<game_id>/qr
Returns: PNG image
/api/live/start with {"mode": "ai"}/api/live//qr → save to outbound media/api/live//move with the move in SAN (e.g. "e5", "Nf6", "O-O")Execute the bundled scripts:
python3 -u scripts/autoplay_stockfish.py --depth 20 --delay 5 python3 -u scripts/autoplay_minimax.py --depth 4 --delay 5 Both scripts support new to auto-start a game. Use -u for unbuffered output.
npx playwright screenshot --browser chromium --viewport-size=440,520 board.html output.pngchess and requests packagesUsers can watch games in browser at:
共 1 个版本