Skip to content

Move the hand levels into files and add 5 levels - #20

Merged
beetlebugorg merged 1 commit into
save-continuefrom
level-files
Dec 4, 2026
Merged

beetlebugorg merged 1 commit into
save-continuefrom
level-files

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

Closes #4. Based on #19.

Each hand level is a file of levels/: level NAME BODY, where the body is a list of street NAME {PART LIST ...}. levels/load.tcl sources the core, then the files in a fixed order, and level passes each body to parseLevel of the core. parseLevel reads the body as a list (no command in it runs), checks the parts, the count of numbers, the numbers, and the bounds, and gives an error FILE:LINE: TEXT with the line of the street. The web build reads app files only with source, so the files are Tcl that calls one data command.

The 5 levels of 0.1.0 moved with no change of data: their routes replay as before. The new levels are Rooftops, The Canal, Market Square, Old Wall, and Lantern Hill, with parts of the game only (blocks, ledges, lamps, springs, boats, boards, water). tools/solve.tcl found a route for each, in 490 to 961 frames, and tests/levels.test replays the 10 routes.

The count of hand levels is handCount in place of the number 5 in the picker, the progress, the street index of the stars, and the save.

What ran here: ztcl test (92 tests pass, 14 new: the 5 new routes, the level checks, and a test that a command in a level file does not run), tests/tk/smoke.tcl and tests/tk/save.tcl with ztk 1.0.0-beta.8 headless, captures of the 15 new streets, the docs build, and the web build in headless Chromium. What did not run: a person who plays the new levels by hand, and a phone.

Each hand level is a file of levels/ that calls `level NAME BODY`.
parseLevel of the core checks each part and gives the file and the
line of a fault. Rooftops, The Canal, Market Square, Old Wall, and
Lantern Hill are new, each with a route from tools/solve.tcl.
@beetlebugorg beetlebugorg added this to the v0.2.0 milestone Dec 4, 2026
@beetlebugorg
beetlebugorg merged commit 9e6dae1 into save-continue Dec 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant