Neon Crates: warn when a crate is stuck and offer a hint from the solver

未关闭
#126 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend, game-dev

调研方向

Read games/crates/solver.ts and games/crates/rules.ts, then trace pushes and solved-state checks in games/crates/scenes/GameScene.ts:166-220. Run npm test and review the late levels in games/crates/levels.ts:175-190. Done means a push onto a non-live cell warns the player and tests cover live-cell checks; hint behavior and its open design questions still need decisions.

由索引模型根据 Issue 内容生成。

描述

enhancement help wanted severity: medium

Summary

Neon Crates gives no warning when a crate is pushed somewhere it can never leave, and has no hint. The solver that could provide both already exists in the repo, though only the tests use it.

Where

  • games/crates/solver.ts:3-5 ("used by the tests ... Not loaded by the game"), :31-47 (liveCells), :131 (solve)
  • games/crates/scenes/GameScene.ts:166-220 (step: moves and checks solved, nothing else)
  • games/crates/levels.ts:175-190 (late levels with par 50 and 68)

Details

liveCells(level) returns the cells from which a crate can still reach a target. solve(level) finds the fewest-moves path. Neither is used by the scene. The only way out of an unwinnable position is repeated UNDO or RESTART, with no sign that the position is already lost.

Proposal

  1. Dead-crate warning (cheap): compute liveCells once per level. When a push lands a crate on a cell that is not live, tint the crate red, play a short buzz and show an "UNDO?" banner. This means moving liveCells into rules.ts or bundling solver.ts.
  2. Hint: give solve an optional start state and a node limit, and add a HINT action. It flashes the next push direction, or shows "NO SOLUTION FROM HERE".

Who benefits

Players on the harder levels, who otherwise push for dozens of moves after a crate is already stuck and then give up. Touch players have only the UNDO and RESTART buttons today.

Open questions

  • Should hints be free, limited per level, or block the par trophy?
  • Should a hint search run in a Worker on large levels?

Acceptance criteria

  • Pushing a crate into a non-target corner shows the warning.
  • Unit tests cover the live-cell check on several levels.

Getting started

  • Relevant files: games/crates/solver.ts, games/crates/rules.ts, games/crates/scenes/GameScene.ts
  • How to run tests: npm test

Filed by repo-audit/full-audit at a93de2e. Severity: medium. Effort: M. audit-key: enhancement|games/crates/scenes/GameScene.ts|hint

主要语言
TypeScript
星标
3
派生
3
平均合并
10 小时 22 分钟
30 天内合并 PR
6

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/GH-Arcade 的其他 Issue

查看 TMHSDigital/GH-Arcade 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。