Neon Crates: play pasted levels in standard box-pushing notation

Abierto
#139 0 comentarios 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
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
game-dev

Línea de trabajo

Read games/crates/rules.ts lines 45–69 to understand parseLevel, then trace level selection in games/crates/scenes/SelectScene.ts and progress handling in games/crates/progress.ts. Check how existing tests are organized before running npm test. Done means valid pasted levels can be played, invalid input explains why it was rejected, and tests cover board-size and crate/target checks.

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

Descripción

enhancement help wanted severity: low

Summary

Neon Crates ships 15 levels, and its level parser already reads the standard box-pushing text notation. Letting players paste a level in that notation would give them something to play after level 15.

Where

  • games/crates/rules.ts:45-69 (parseLevel): accepts # . $ * @ + space -, and throws on anything else or a missing or doubled robot
  • games/crates/levels.ts:3-8, games/crates/scenes/SelectScene.ts
  • games/crates/progress.ts:33-43: progress is keyed by level name

Proposal

  • Add a CUSTOM entry to the select screen that takes pasted text, through a textarea overlay or a clipboard read on a user gesture.
  • Parse the text with parseLevel, and reject levels over the board size limit or with unequal crate and target counts.
  • Play custom levels without trophies, and keep their bests under a separate key validated like cleanProgress.
  • Treat the text as outside input: cap its length, and never render it as HTML.

Who benefits

Players who finish all 15 levels. Large free collections exist in exactly this notation.

Open questions

  • How should multi-level collections be handled (blank-line separated, with ; titles)?
  • Is clipboard read acceptable on iOS, or is a textarea needed?

Acceptance criteria

  • Pasting a valid level plays it, and pasting an invalid one shows why it was rejected.
  • Tests cover the size and crate/target checks.

Getting started

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

Filed by repo-audit/full-audit at a93de2e. Severity: low. Effort: M. audit-key: enhancement|games/crates/rules.ts|custom-levels

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.