nectar/kinode/packages/chess/api/chess:sys-api-v0.wit

28 lines
589 B
Plaintext
Raw Normal View History

2024-05-07 02:48:23 +03:00
interface chess-sys-api-v0 {
2024-05-14 05:43:09 +03:00
/// Our "chess protocol" request/response format. We'll always serialize these
/// to a byte vector and send them over IPC.
2024-05-06 21:12:08 +03:00
variant chess-request {
new-game(new-game-request),
move(move-request),
resign(string),
}
variant chess-response {
new-game-accepted,
new-game-rejected,
move-accepted,
move-rejected,
}
record new-game-request {
white: string,
black: string,
}
record move-request {
game-id: string,
move-str: string,
}
}