This commit is contained in:
2025-12-03 21:40:18 +05:30
parent 81a54aa93e
commit ee31b010ac

View File

@@ -39,7 +39,6 @@ export default function BattleShipBoard({
const myIndex = players.findIndex((p) => p.user_id === myUserId);
const oppIndex = myIndex === 0 ? 1 : 0;
console.log(metadata, "metadata");
const phase = metadata["phase"] ?? "lobby";
const isMyTurn = phase === "battle" && turn === myIndex;
@@ -68,8 +67,10 @@ export default function BattleShipBoard({
function handleShoot(r: number, c: number) {
sendMatchData(matchId!, 1, {
action: "shoot",
data: {
row: r,
col: c,
}
});
}