🎮 游戏配置
游戏模式
闯关模式:每关设定目标分数,达成后自动升关,速度随关卡提升。
初始速度
当前帧间隔 200ms
棋盘大小
格子数量 400格
食物说明
🍎 普通食物 +1分,常规出现
金苹果 +5分,随机出现,光晕闪烁
💎 钻石 +10分,极稀有,10秒消失
🍄 毒蘑菇 吃到蛇身缩短2格
加速食物 移速+50%,持续5秒
奖品配置(达到长度解锁)
🎁 格长度
🏆 格长度
👑 格长度
0
分数
1
关卡
3
蛇长
0
最高分
LEVEL UP!
速度提升,继续加油!
🐍
贪吃蛇闯关
方向键 / WASD 控制移动
吃到食物蛇身变长,达标解锁关卡
📊 实时数据
关卡进度
1 初探蛇径
0分 目标 30分
食物统计
🍎
普通食物
+1分
0
金苹果
+5分
0
💎
钻石
+10分
0
🍄
毒蘑菇
-2格长度
0
加速食物
5秒加速
0
奖品解锁
历史记录
0
历史最高分
最长蛇身 0
最高关卡 0
本局状态 等待开始
function mobileSwitchTab(tab) { var left = document.getElementById('panel-left'); var right = document.getElementById('panel-right'); document.querySelectorAll('.mobile-tab').forEach(function(b){b.classList.remove('active');}); var btn = document.getElementById('tab-' + tab); if (btn) btn.classList.add('active'); if (tab === 'config') { if (left) left.classList.toggle('expanded'); if (right) right.classList.remove('expanded'); } else if (tab === 'data') { if (right) right.classList.toggle('expanded'); if (left) left.classList.remove('expanded'); } else { if (left) left.classList.remove('expanded'); if (right) right.classList.remove('expanded'); } } function toggleSound() { var on = GameSound.toggle(); var icon = document.getElementById('sound-icon'); if (icon) icon.textContent = on ? '🔊' : '🔇'; }