dataflow.api.run_simplified¶
Simplified demo to launch a WebSocket server for chess games.
This is a minimal implementation that focuses on getting the WebSocket functionality working without the full API infrastructure.
Functions¶
Serve the chess client HTML. |
|
|
Get the current player. |
Create an empty chess board in starting position. |
|
|
Get the full game state. |
|
Get the current game status. |
|
Run the WebSocket server. |
|
Make a simple AI move. |
|
Make a move on the board. |
|
Check if a move is valid. |
|
WebSocket endpoint for chess games. |
Module Contents¶
- async dataflow.api.run_simplified.get_client()¶
Serve the chess client HTML.
- dataflow.api.run_simplified.get_current_player(board)¶
Get the current player.
- dataflow.api.run_simplified.get_empty_board()¶
Create an empty chess board in starting position.
- dataflow.api.run_simplified.get_game_state(game_id)¶
Get the full game state.
- dataflow.api.run_simplified.get_game_status(board)¶
Get the current game status.
- dataflow.api.run_simplified.main()¶
Run the WebSocket server.
- async dataflow.api.run_simplified.make_ai_move(websocket, game_id)¶
Make a simple AI move.
- Parameters:
websocket (fastapi.WebSocket)
game_id (str)
- dataflow.api.run_simplified.make_move(board, move_uci)¶
Make a move on the board.
- dataflow.api.run_simplified.move_is_valid(board, move_uci)¶
Check if a move is valid.