搭建一个网页版的贪吃蛇游戏
built
Stop
Tokens
—
0 in · 0 out
📝
Emma
· Product Manager
PRD
· awaiting your approval
搭建一个网页版的贪吃蛇游戏
搭建一个网页版的贪吃蛇游戏
For
You — the founder
Value
Quick prototype, no PM cycle.
Build plan
Implement the user's idea as a single-page web app
Use Tailwind via CDN
Persist any state to localStorage
Approved — Alex is on it.
⚡
Alex
· Engineer
list_files
⚡
Alex
· Engineer
⚡
Alex
· Engineer
run_command
pwd
⚡
Alex
· Engineer
⚡
Alex
· Engineer
write_file
index.html
⚡
Alex
· Engineer
index.html · 1.9 KB
⚡
Alex
· Engineer
write_file
style.css
⚡
Alex
· Engineer
style.css · 0.4 KB
⚡
Alex
· Engineer
write_file
app.js
⚡
Alex
· Engineer
app.js · 4.7 KB
⚡
Alex
· Engineer
list_files
⚡
Alex
· Engineer
⚡
Alex
· Engineer
run_command
ls -la
⚡
Alex
· Engineer
⚡
Alex
· Engineer
focus_file
app.js
⚡
Alex
· Engineer
⚡
Alex
· Engineer
show_preview
⚡
Alex
· Engineer
⚡
Alex
· Engineer
✅ 贪吃蛇游戏已经搭建完成啦!你可以点击"开始游戏"按钮开始,用方向键控制蛇的移动,吃到红色食物得分,撞到墙或者自己身体就会结束游戏。最高分自动保存在本地存储里,刷新页面也不会丢失~
👤
You
将蛇的初始长度设为6
⚡
Alex
· Engineer
read_file
app.js
⚡
Alex
· Engineer
app.js · 4.7 KB
⚡
Alex
· Engineer
write_file
app.js
⚡
Alex
· Engineer
app.js · 4.9 KB
⚡
Alex
· Engineer
focus_file
app.js
⚡
Alex
· Engineer
⚡
Alex
· Engineer
show_preview
⚡
Alex
· Engineer
⚡
Alex
· Engineer
✅ 已经将蛇的初始长度修改为6啦!现在重新开始游戏,你就会看到初始长度为6的蛇,从坐标(10,10)开始向左排列,初始方向朝右移动。点击开始游戏按钮就可以体验啦~
Preview
Code
Database
Shell
●
atoms-cloud://preview/index.html