AGENT SKILL

2048-web-development

Implement or review the 2048 browser client, including its rules engine, responsive UI, accessibility, PWA metadata, screenshots, or SEO.

License 许可
MIT
最近更新
2026-09-28
Stars
★ 22
Forks
14

01 前言 Front Matter

name
2048-web-development
description
Implement or review the 2048 browser client, including its rules engine, responsive UI, accessibility, PWA metadata, screenshots, or SEO.

02 资源文件 2

03 SKILL.md 正文

2048 web development

Read AGENTS.md and docs/architecture.md. Keep rules in Web-Version/game-engine.js deterministic and DOM/storage concerns in Web-Version/script.js. The app must remain static and work beneath the GitHub Pages /2048-Game/ base path.

For controls, use inline SVG with a viewBox, center it through layout, and put the accessible name on the button. Preserve keyboard arrows, WASD, touch swipes, mobile direction buttons, undo, restart confirmation, state recovery, win continuation, and game-over restart.

A board swipe must not scroll the page. The board sets touch-action: none, html/body set overscroll-behavior: none, and a non-passive touchmove listener scoped to the board calls preventDefault() — the other touch listeners are passive and cannot. Keep the touchcancel handler that clears the start point, and keep scrolling working for gestures that begin anywhere else.

When changing public content or routes, update canonical/social metadata, JSON-LD, sitemap, robots, manifest, and llms*.txt where relevant. Do not add claims or structured data that are not visible and true on the page.

Run make check and make test-web. Optional cloud work lives in Web-Version/cloud.js and account.js — keep play local-first and see docs/backend.md. For visible changes, run make screenshots-web and inspect desktop and mobile gameplay, restart, win, loss, About, and cloud surfaces (guest banner, auth dialogs, leaderboard, account).

04 同仓库更多 Skills