请帮我用 React…
- User
请帮我用 React 开发一个三人斗地主的小游戏。核心要求:规则:符合中国标准的斗地主规则(包括炸弹、顺子、飞机、王炸等牌型判断)。流程要有洗牌、发牌、叫地主/抢地主、出牌、结算这几个完整阶段。体验界面要看着像个正经游戏,不要太丑。必须要有音效(背景音乐+出牌语音)。需要有简单的 AI 跟我对打,不然一个人没法玩。请使用中文语音及中文界面
Assistant
I will explore the existing project files to understand the project structure and installed dependencies.
I will read package.json to see the available packages and dependencies.
I will install
lucide-reactandcanvas-confetti(and@types/canvas-confetti) for game UI icons and victory celebration effects.I will read
src/index.cssandindex.htmlto check the styling setup.I will read
index.html.I will create
src/game/types.tsto define all data structures including card suits, ranks, hand patterns, player states, game stages, settlement details, and statistics.I will create
src/game/deck.tsto manage deck generation, card shuffling, and hand sorting algorithms.I will create
src/game/rules.tswith complete and rigorous card pattern parsing, validation, comparison, and valid play generation.I will edit
src/game/rules.tsto remove unused imports and variables.I will remove
getCardsinsrc/game/rules.ts.I will create
src/game/ai.tswith intelligent evaluation heuristics for calling, teammate cooperation, defense, and offensive sprint moves.I will remove the unused import in
src/game/ai.ts.I will create
src/audio/soundManager.tsimplementing a complete procedural Web Audio sound effect synthesizer, Chinese speech synthesis engine, and background music generator.I will create
src/components/CardView.tsxto render playing cards with suits, rank typography, selection animations, face-down backs, and landlord tags.I will remove the unused import in
src/components/CardView.tsx.I will create
src/components/PlayerSeat.tsxto handle avatar displays, identity badges, remaining card counters, turn indicators, speech bubbles, and interactive emotes.I will create
src/components/TableCenter.tsxto display the 3 landlord bottom cards, current table multiplier, and the played cards in the center for all three players.I will create
src/components/SpecialEffects.tsxto display animations for Bombs, Rockets, Airplanes, and Springs.I will update
src/index.csswith animation keyframes for card playing, bomb blasts, rockets, airplanes, and table board textures.I will create
src/components/CardTracker.tsxto provide a real-time card counter tracking all 15 poker ranks.I will create for sending classic voice lines and interactive emoji props.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.