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.

Attributes¶

Functions¶

get_client()

Serve the chess client HTML.

get_current_player(board)

Get the current player.

get_empty_board()

Create an empty chess board in starting position.

get_game_state(game_id)

Get the full game state.

get_game_status(board)

Get the current game status.

main()

Run the WebSocket server.

make_ai_move(websocket, game_id)

Make a simple AI move.

make_move(board, move_uci)

Make a move on the board.

move_is_valid(board, move_uci)

Check if a move is valid.

websocket_endpoint(websocket, game_id)

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: fastapi.WebSocket, game_id: str)¶

Make a simple AI move.

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.

async dataflow.api.run_simplified.websocket_endpoint(websocket: fastapi.WebSocket, game_id: str)¶

WebSocket endpoint for chess games.

dataflow.api.run_simplified.active_connections: set[fastapi.WebSocket]¶
dataflow.api.run_simplified.active_games: dict[str, dict]¶
dataflow.api.run_simplified.app¶
dataflow.api.run_simplified.connection_game_map: dict[fastapi.WebSocket, str]¶
dataflow.api.run_simplified.current_dir¶
dataflow.api.run_simplified.logger¶