enhancementgood first issuehacktoberfest
仓库指标
- 星标
- (0 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
Some players prefer playing without sound or with their own music, but the game currently lacks audio control options. Without mute buttons, users may find the experience intrusive or distracting.
🎯 Proposed Solution
- Add sound and music toggles in the settings panel.
- Allow players to control separately:
- Sound effects (e.g., merges, moves).
- Background music (if available).
- Save preferences to local storage for persistence.
✅ Expected Behavior
- Players can mute/unmute sound effects and background music independently.
- Audio settings persist across sessions.
- No background audio plays after muting.
💻 Technical Notes
- Use HTML5 Audio API or Web Audio API for control.
- Implement volume and mute state management.
- Ensure accessibility: provide visual indicators for mute state.
🧪 Test Steps
- Mute sound effects → verify no sounds play during moves.
- Mute music → background audio stops.
- Refresh page → preferences persist.