极简对战前端。
Minimal battle frontend.
- 每回合双方各出一张牌。 / Each round, both sides play one card.
- 石头克剪刀,剪刀克布,布克石头。 / Rock beats scissors, scissors beat paper, paper beats rock.
- 胜负看本回合出牌结果。 / The round result decides the outcome.
- 平局时进入平局处理。 / A tie triggers tie handling.
- 可换牌时,选中一张牌后执行换牌。 / If exchange is allowed, select a card and exchange it.
- 房间对战中,双方都出牌后才结算下一步。 / In rooms, resolution starts only after both players move.
- 登录与注册 / Login and register
- 人机对战 / Bot matches
- 多人房间 / Multiplayer rooms
- 实时同步 / Real-time sync
- 排行榜 / Leaderboard
bun install
bun devVITE_API_BASE_URL=http://localhost:3000
VITE_TURNSTILE_SITE_KEY=1x00000000000000000000AA
VITE_TURNSTILE_SITE_KEY是前端公开的site key。 /VITE_TURNSTILE_SITE_KEYis the public frontend site key.- 前端提交给后端的是
turnstileToken,不是secret key。 / The frontend sendsturnstileToken, not the secret key.