From 34d61fcc7035ebd7ffb636d13308166c90b474b2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 11 Aug 2024 22:15:36 +0900 Subject: feat: simplify starting procedure --- frontend/app/components/GolfPlayApp.client.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'frontend/app/components/GolfPlayApp.client.tsx') diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx index 4e200e2..eafbd1d 100644 --- a/frontend/app/components/GolfPlayApp.client.tsx +++ b/frontend/app/components/GolfPlayApp.client.tsx @@ -104,10 +104,7 @@ export default function GolfPlayApp({ } else if (readyState === ReadyState.OPEN) { if (lastJsonMessage !== null) { console.log(lastJsonMessage.type); - if (lastJsonMessage.type === "player:s2c:prepare") { - console.log("player:c2s:ready"); - sendJsonMessage({ type: "player:c2s:ready" }); - } else if (lastJsonMessage.type === "player:s2c:start") { + if (lastJsonMessage.type === "player:s2c:start") { if ( gameState !== "starting" && gameState !== "gaming" && @@ -131,8 +128,6 @@ export default function GolfPlayApp({ } } else { setGameState("waiting"); - console.log("player:c2s:entry"); - sendJsonMessage({ type: "player:c2s:entry" }); } } }, [sendJsonMessage, lastJsonMessage, readyState, gameState, currentScore]); -- cgit v1.2.3-70-g09d2