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

Abierto
#126 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
3
Forks
3
Merge medio
10 h 22 min
PR fusionados (30 d)
6

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TMHSDigital/GH-Arcade

Todos los issues de TMHSDigital/GH-Arcade

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.