diff options
Diffstat (limited to 'frontend/src/routes/golf/play/apps')
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Connecting.tsx | 8 | ||||
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Failed.tsx | 8 | ||||
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Finished.tsx | 27 | ||||
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Gaming.tsx | 30 | ||||
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Starting.tsx | 13 | ||||
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Waiting.tsx | 8 |
6 files changed, 0 insertions, 94 deletions
diff --git a/frontend/src/routes/golf/play/apps/Connecting.tsx b/frontend/src/routes/golf/play/apps/Connecting.tsx deleted file mode 100644 index ead4f03..0000000 --- a/frontend/src/routes/golf/play/apps/Connecting.tsx +++ /dev/null @@ -1,8 +0,0 @@ -type Props = { - gameId: number; - playerId: number; -}; - -export default function Connecting(_props: Props) { - return <div>接続中です......</div>; -} diff --git a/frontend/src/routes/golf/play/apps/Failed.tsx b/frontend/src/routes/golf/play/apps/Failed.tsx deleted file mode 100644 index cc1748d..0000000 --- a/frontend/src/routes/golf/play/apps/Failed.tsx +++ /dev/null @@ -1,8 +0,0 @@ -type Props = { - gameId: number; - playerId: number; -}; - -export default function Failed(_props: Props) { - return <div>エラー</div>; -} diff --git a/frontend/src/routes/golf/play/apps/Finished.tsx b/frontend/src/routes/golf/play/apps/Finished.tsx deleted file mode 100644 index e04c7a0..0000000 --- a/frontend/src/routes/golf/play/apps/Finished.tsx +++ /dev/null @@ -1,27 +0,0 @@ -type Props = { - gameId: number; - playerId: number; - result: { yourScore: number | null; opponentScore: number | null }; -}; - -export default function Finished({ result }: Props) { - const { yourScore, opponentScore } = result; - const yourScoreToCompare = yourScore ?? Infinity; - const opponentScoreToCompare = opponentScore ?? Infinity; - const resultText = - yourScoreToCompare === opponentScoreToCompare - ? "引き分け" - : yourScoreToCompare < opponentScoreToCompare - ? "あなたの勝ち" - : "あなたの負け"; - return ( - <> - <div>対戦終了</div> - <div> - <div>{resultText}</div> - <div>あなたのスコア: {yourScore ?? "なし"}</div> - <div>相手のスコア: {opponentScore ?? "なし"}</div> - </div> - </> - ); -} diff --git a/frontend/src/routes/golf/play/apps/Gaming.tsx b/frontend/src/routes/golf/play/apps/Gaming.tsx deleted file mode 100644 index 9be39c8..0000000 --- a/frontend/src/routes/golf/play/apps/Gaming.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react"; - -type Props = { - gameId: number; - playerId: number; - problem: string | null; - onCodeChange: (data: { code: string }) => void; - score: number | null; -}; - -export default function Gaming({ problem, onCodeChange, score }: Props) { - const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => { - onCodeChange({ code: e.target.value }); - }; - - return ( - <div style={{ display: "flex" }}> - <div style={{ flex: 1, padding: "10px", borderRight: "1px solid #ccc" }}> - <div>{problem}</div> - <div>{score == null ? "Score: -" : `Score: ${score} byte`}</div> - </div> - <div style={{ flex: 1, padding: "10px" }}> - <textarea - style={{ width: "100%", height: "100%" }} - onChange={handleTextChange} - /> - </div> - </div> - ); -} diff --git a/frontend/src/routes/golf/play/apps/Starting.tsx b/frontend/src/routes/golf/play/apps/Starting.tsx deleted file mode 100644 index b260b30..0000000 --- a/frontend/src/routes/golf/play/apps/Starting.tsx +++ /dev/null @@ -1,13 +0,0 @@ -type Props = { - gameId: number; - playerId: number; - timeLeft: number | null; -}; - -export default function Starting({ timeLeft }: Props) { - return ( - <> - <div>対戦相手が見つかりました。{timeLeft} 秒後にゲームを開始します。</div> - </> - ); -} diff --git a/frontend/src/routes/golf/play/apps/Waiting.tsx b/frontend/src/routes/golf/play/apps/Waiting.tsx deleted file mode 100644 index b7e6f31..0000000 --- a/frontend/src/routes/golf/play/apps/Waiting.tsx +++ /dev/null @@ -1,8 +0,0 @@ -type Props = { - gameId: number; - playerId: number; -}; - -export default function Waiting(_props: Props) { - return <div>対戦相手が現れるのを待っています......</div>; -} |
