aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/GolfPlayApp.client.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-11 22:15:36 +0900
committernsfisis <nsfisis@gmail.com>2024-08-11 22:54:29 +0900
commit34d61fcc7035ebd7ffb636d13308166c90b474b2 (patch)
treecf120caf0b1d27b4067b1e1133b787618906d8fc /frontend/app/components/GolfPlayApp.client.tsx
parentc7599c74722864d54c96a3f3d52e28290abb9eac (diff)
downloadphperkaigi-2025-albatross-34d61fcc7035ebd7ffb636d13308166c90b474b2.tar.gz
phperkaigi-2025-albatross-34d61fcc7035ebd7ffb636d13308166c90b474b2.tar.zst
phperkaigi-2025-albatross-34d61fcc7035ebd7ffb636d13308166c90b474b2.zip
feat: simplify starting procedure
Diffstat (limited to 'frontend/app/components/GolfPlayApp.client.tsx')
-rw-r--r--frontend/app/components/GolfPlayApp.client.tsx7
1 files changed, 1 insertions, 6 deletions
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]);