import { PlayerInfo } from "../../models/PlayerInfo"; import { submitResultStatusToLabel } from "../../models/SubmitResult"; import ExecStatusIndicatorIcon from "../ExecStatusIndicatorIcon"; type Props = { problem: string; playerInfoA: PlayerInfo; playerInfoB: PlayerInfo; leftTimeSeconds: number; }; export default function GolfWatchAppGaming({ problem, playerInfoA, playerInfoB, leftTimeSeconds, }: Props) { const leftTime = (() => { const m = Math.floor(leftTimeSeconds / 60); const s = leftTimeSeconds % 60; return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`; })(); const scoreRatio = (() => { const scoreA = playerInfoA.score ?? 0; const scoreB = playerInfoB.score ?? 0; const totalScore = scoreA + scoreB; return totalScore === 0 ? 50 : (scoreB / totalScore) * 100; })(); return (
{playerInfoA.code}
{playerInfoB.code}