1
0
mirror of https://github.com/thib8956/tic-tac-toe-ws.git synced 2025-08-24 00:11:56 +00:00

Implement click to reset at the end of game

This commit is contained in:
2025-01-24 16:19:16 +01:00
parent 797a32c00a
commit 6da3762502
3 changed files with 27 additions and 12 deletions

View File

@@ -1,16 +1,16 @@
export type MessageKind = "hello" | "update" | "endgame" | "reset";
export type MessageKind = "click" | "hello" | "update" | "endgame" | "reset";
export interface Message {
kind: MessageKind,
data: Response | Hello | EndGame | Reset,
data: Click | Update | Hello | EndGame | Reset,
}
export interface Request {
export interface Click {
x: number,
y: number
}
export interface Response {
export interface Update {
last: { x: number, y: number, symbol: "x" | "o" }
}