allow player to claim win/draw for abandoned games

This commit is contained in:
Nathaniel Tampus
2023-03-25 19:18:01 +08:00
parent 10ed00ebc0
commit d469cdff56
4 changed files with 166 additions and 11 deletions

View File

@@ -6,7 +6,8 @@ import {
getLatestGame,
sendMove,
joinAsPlayer,
chat
chat,
claimAbandoned
} from "./game.socket.js";
const socketConnect = (socket: Socket) => {
@@ -34,6 +35,7 @@ const socketConnect = (socket: Socket) => {
socket.on("sendMove", sendMove);
socket.on("joinAsPlayer", joinAsPlayer);
socket.on("chat", chat);
socket.on("claimAbandoned", claimAbandoned);
};
export const init = () => {