diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-29 02:59:07 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-29 02:59:07 +0900 |
| commit | d1c8aa42aec32c8b042ae32d249df9c3c969453d (patch) | |
| tree | 2f248715213d12d6649f32b5ddcbb0d9a0281ed8 /frontend/app/components/GolfPlayApps | |
| parent | 22ddf340f0b0c8d0cd04c34d9fa1481a1fbf422f (diff) | |
| parent | 161d82bee9f9e65680516a9cfd392e0cf297eadf (diff) | |
| download | phperkaigi-2025-albatross-d1c8aa42aec32c8b042ae32d249df9c3c969453d.tar.gz phperkaigi-2025-albatross-d1c8aa42aec32c8b042ae32d249df9c3c969453d.tar.zst phperkaigi-2025-albatross-d1c8aa42aec32c8b042ae32d249df9c3c969453d.zip | |
Merge branch 'game-playing'
Diffstat (limited to 'frontend/app/components/GolfPlayApps')
5 files changed, 46 insertions, 0 deletions
diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppConnecting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppConnecting.tsx new file mode 100644 index 0000000..e92a8e0 --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppConnecting.tsx @@ -0,0 +1,3 @@ +export default function GolfPlayAppConnecting() { + return <div>Connecting...</div>; +} diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppFinished.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppFinished.tsx new file mode 100644 index 0000000..75ceb71 --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppFinished.tsx @@ -0,0 +1,3 @@ +export default function GolfPlayAppFinished() { + return <div>Finished</div>; +} diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx new file mode 100644 index 0000000..332cb3c --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -0,0 +1,30 @@ +export default function GolfPlayAppGaming({ + problem, + onCodeChange, + currentScore, +}: { + problem: string; + onCodeChange: (code: string) => void; + currentScore: number | null; +}) { + const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => { + onCodeChange(e.target.value); + }; + + return ( + <div style={{ display: "flex" }}> + <div style={{ flex: 1, padding: "10px", borderRight: "1px solid #ccc" }}> + <div>{problem}</div> + <div> + {currentScore == null ? "Score: -" : `Score: ${currentScore}`} + </div> + </div> + <div style={{ flex: 1, padding: "10px" }}> + <textarea + style={{ width: "100%", height: "100%" }} + onChange={handleTextChange} + /> + </div> + </div> + ); +} diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx new file mode 100644 index 0000000..bf45abb --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppStarting.tsx @@ -0,0 +1,7 @@ +export default function GolfPlayAppStarting({ + timeLeft, +}: { + timeLeft: number; +}) { + return <div>Starting... ({timeLeft} s)</div>; +} diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx new file mode 100644 index 0000000..a0751e0 --- /dev/null +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx @@ -0,0 +1,3 @@ +export default function GolfPlayAppWaiting() { + return <div>Waiting...</div>; +} |
