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

オープン
#139 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。