Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 384 Bytes

File metadata and controls

28 lines (19 loc) · 384 Bytes

贪吃蛇游戏

这是一个使用Python和Pygame开发的经典贪吃蛇游戏。

游戏特点

  • 使用方向键控制蛇的移动
  • 吃到食物会增加长度和分数
  • 撞到自己会重置游戏
  • 穿墙功能
  • 实时显示分数

运行要求

  • Python 3.x
  • Pygame

安装依赖

pip install pygame

运行游戏

python snake_game.py