GithubHelp home page GithubHelp logo

hellodqy / snake Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5.23 MB

基于HTML, CSS, JS实现的网页版贪吃蛇,支持单人游戏和双人对抗(在线试玩)

Home Page: https://snake-weld-alpha.vercel.app

License: MIT License

HTML 12.96% JavaScript 78.03% CSS 9.01%

snake's Introduction

贪吃蛇游戏

这是一款使用 HTML、CSS 和 JavaScript 实现的网页版贪吃蛇游戏,支持单人游戏和双人对抗模式。

试玩

贪吃蛇网页版

功能特点

  • 单人游戏模式:玩家可以控制贪吃蛇吃食物,蛇会不断变长,游戏结束条件为蛇头撞到墙壁或自己的身体。
  • 双人对抗模式:两位玩家可以同时控制两条蛇,互相竞争,最后一条存活的蛇获胜。
  • 可选择的游戏难度:游戏提供简单、适中和困难三种难度供玩家选择,难度会影响游戏速度和食物生成频率。

使用说明

  1. 在浏览器中打开 index.html 文件。
  2. 选择游戏模式和难度。
  3. 点击 "开始游戏" 按钮开始游戏。
  4. 使用键盘上的方向键控制蛇的移动。
  5. 在单人游戏模式下,蛇撞墙或撞到自己的身体会游戏结束。在双人对抗模式下,最后一条存活的蛇获胜。

设计思路

详见设计文档

技术细节

详见技术文档

版权与许可

该项目基于 MIT 许可证进行分发和共享。详情请参阅 LICENSE 文件。

联系我们

如有任何问题或建议,请联系我:[email protected]

snake's People

Contributors

hellodqy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.