Ladrilho: Block Puzzle
README.md
ladrilho.adventure
The Adventure's 60 levels as data, and what the map, the goal card, the play HUD and the
tests ask of them. The levels live in levels/chapter1.json .. levels/chapter5.json
in this package (one chapter a file: defaults every level inherits, then twelve
blockPuzzleKit level tables with goals, moves, an ascii map and a designer note).
local Adventure = require("ladrilho.adventure")
local lv = Adventure.level(13) -- blockPuzzleKit level table, defaults merged
Adventure.goalLines(13) -- { "Collect 2 gems" } in the kit's language
Adventure.play(13, 42, "hard") -- the computer plays it: { won, moves, score, stars }
Called by ladrilho.modes (the adventure session), ladrilho.app / ladrilho.screens
(the map, goal card and HUD) and the ladrilhoAdventure test suite, which has the hard
AI beat every level. Stars come from moves to spare (the kit's rule for levels without
score thresholds). Design: plans/ladrilho-adventure.plan.