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

未關閉
#139 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
55/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript
領域
game-dev

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
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 摘要。