dataflow.api.simple_chess_ws¶
Simple WebSocket server for streaming chess game state.
Functions¶
Create a new chess board in starting position. |
|
|
Get the current game state. |
|
Serve the HTML client. |
|
Run the WebSocket server. |
|
Make a random legal move. |
|
WebSocket endpoint for chess games. |
Module Contents¶
- dataflow.api.simple_chess_ws.get_empty_board()¶
Create a new chess board in starting position.
- dataflow.api.simple_chess_ws.get_game_state(game_id)¶
Get the current game state.
- async dataflow.api.simple_chess_ws.get_html()¶
Serve the HTML client.
- dataflow.api.simple_chess_ws.main()¶
Run the WebSocket server.
- dataflow.api.simple_chess_ws.make_random_move(board)¶
Make a random legal move.