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

Aberta
#139 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
game-dev

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
TypeScript
Estrelas
3
Forks
3
Merge médio
10h 22min
PRs com merge (30d)
6

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/GH-Arcade

Todas as issues de TMHSDigital/GH-Arcade

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.