import { faArrowDown } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { PlayerInfo } from "../../models/PlayerInfo"; import BorderedContainer from "../BorderedContainer"; import ExecStatusIndicatorIcon from "../ExecStatusIndicatorIcon"; import SubmitStatusLabel from "../SubmitStatusLabel"; type Props = { gameDisplayName: string; gameDurationSeconds: number; leftTimeSeconds: number; playerInfoA: PlayerInfo; playerInfoB: PlayerInfo; problemTitle: string; problemDescription: string; }; export default function GolfWatchAppGaming({ gameDisplayName, gameDurationSeconds, leftTimeSeconds, playerInfoA, playerInfoB, }: Props) { const leftTime = (() => { const k = gameDurationSeconds + leftTimeSeconds; const m = Math.floor(k / 60); const s = k % 60; return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`; })(); const scoreRatio = (() => { const scoreA = playerInfoA.score; const scoreB = playerInfoB.score; if (scoreA === null && scoreB === null) { return 50; } else if (scoreA === null) { return 0; } else if (scoreB === null) { return 100; } else { return (scoreB / (scoreA + scoreB)) * 100; } })(); return (
{playerInfoA.code}
{r.stdout}
{r.stderr}
{r.stdout}
{r.stderr}
{playerInfoB.code}