Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Memory game built with React, TypeScript, Tailwind CSS and Motion, featuring solo and local multiplayer modes, animated tiles, responsive layouts and keyboard-accessible controls.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
This is a solution to the Memory game challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
• View the optimal layout for the game depending on their device's screen size
• See hover states for all interactive elements on the page
• Play the Memory game either solo or multiplayer (up to 4 players)
• Set the theme to use numbers or icons within the tiles
• Choose to play on either a 6x6 or 4x4 grid
• Solution URL: GitHub Repository
• Live site URL: Memory Game查看完整 README ↗This is a solution to the Memory game challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
This solution opens on the Start Game screen. A player who finds a pair plays again and a miss passes the turn, as in the classic Concentration rules. The mobile menu also pauses the game, which the brief doesn't ask for: paused time is not counted.
@themeuseReducer and the React CompilerState: one reducer (src/contexts/game-reducer.ts) holds the board, players, turn, moves and clock, and accepts setup changes only between games. Every user action goes through useGameActions (src/hooks/useGameActions.ts), which creates the shuffled board and the timestamps when the event happens, so the reducer stays pure; only the provider's own timers dispatch the clock tick and the pair resolution.
Derived values: the results summary and the screen-reader announcements are pure functions of the state (src/utils), recomputed whenever the context re-renders their component.
Board: every new board draws its values at random, 8 pairs on 4x4 and 18 on 6x6, from the numbers 0-99 or from 40 icons.
Matching: after the second tile, the provider waits (longer on a mismatch, so the value can be read), then resolves the pair. The resolution carries a round id, so a check left over from a restarted game is ignored. Pausing freezes the check; resuming starts it again.
Clock: in a solo game the clock starts with the first tile, not with Start Game or Restart, so the board entrance and any time spent looking at it are not counted. Play time is counted from performance.now() timestamps, so pauses keep the part of a second already played and a background tab still counts real time. The last pair stops it. Multiplayer games show no time, so they run no clock and no interval.
Announcements: each tile's accessible name gives its position, and its value once revealed. A polite status region announces only what a tile can't: match or no match, pairs found or moves, and whose turn it is. It stays silent while a pair is being revealed.
Navigation: /game without a game in progress redirects to /start. Going back to the setup screen ends the current game, so Forward never shows an old board with new options. Every route change starts from the top of the page.
Reduced motion: MotionConfig reducedMotion="user" makes flips, scaling and travel instant when the system asks for reduced motion; short fades remain.
Styles: styles with several variants or combinations (buttons, stats, board, tile faces) are cva definitions kept, unexported, in the component that uses them, in src/components or in its wrapper in src/ui; src/constants keeps only shared game data. Those that depend on two props at once, like the stats' top margin by mode and grid size, use . Simple two-state cases, like the logo color, stay plain conditional classes.
useIsPresent and turns inert while its board leaves: no clicks, no returning focus.I used Claude Code mainly as a reviewer. Most of the work went into setting up its context: a CLAUDE.md with the working agreement, rules for state, UI primitives, motion and verification, a design reference taken from the Figma file, and a few skills (Motion, shadcn, Vercel's React best practices and web design guidelines). With that in place, it reviewed code, accessibility and design fidelity, checking its findings in the running app.
compoundVariantsconst statHighlightVariants = cva("absolute inset-0 -z-10", {
variants: {
highlight: { turn: "bg-orange-500", winner: "bg-blue-800" },
},
});
statHighlightVariants({ highlight: "turn" });