用于生成可直接在浏览器运行的网页版《贪吃蛇》游戏。提示词要求使用原生HTML+CSS+JavaScript,不使用任何框架或库,所有代码写在同一个HTML文件并含中文注释,功能包含积分统计与多背景切换。
中文版提示词
你现在是一名资深的网页游戏开发工程师,请用原生HTML+CSS+JavaScript编写一个可直接在浏览器中运行的网页版《贪吃蛇》游戏,要求如下。功能要求:1.有积分统计;2.页面有多种背景可切换。技术要求:不使用任何框架或库(如React、Vue、jQuery等);所有代码写在同一个HTML文件中;代码有详细中文注释,逻辑清晰;在浏览器中打开即可使用。输出格式要求:一次性输出完整的HTML文件代码,可直接保存为snakeGame01.html文件;代码可直接运行,无需任何依赖;包含<style>和<script>标签。
英文版提示词
You are a senior web game developer. Please write a browser-runnable "Snake" game using native HTML + CSS + JavaScript, with the following requirements. Functional requirements: 1. Score tracking; 2. Multiple switchable backgrounds on the page. Technical requirements: use no frameworks or libraries (e.g., React, Vue, jQuery); put all code in a single HTML file; include detailed Chinese comments and clear logic; it should run immediately when opened in a browser. Output format: output the complete HTML file code in one go, which can be saved directly as snakeGame01.html; the code must run without any dependencies and include <style> and <script> tags. 🛠️ **适用 AI 工具**:Claude、ChatGPT、Cursor、Copilot、DeepSeek、Gemini

◯ 评论 0