Skip to content

tool: scenariotest: EDN scenario + play-loop harness - #170

Merged
mparrett merged 5 commits into
mainfrom
tool/scenariotest
Jul 23, 2026
Merged

tool: scenariotest: EDN scenario + play-loop harness#170
mparrett merged 5 commits into
mainfrom
tool/scenariotest

Conversation

@mparrett

@mparrett mparrett commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

image Screenshot 2026-07-22 at 9 43 55 AM

Run

lg tools/scenariotest.lg                              # default: water-burning
lg tools/scenariotest.lg tools/scenarios/water-burning.edn
lg tools/scenariotest.lg tools/scenarios/web-trample.edn
lg tools/scenariotest.lg --check                      # build-only smoke, no TTY

In the TUI, normal game keys (. wait, movement keys, Esc/Ctrl-C quit). Unhandled menu screens are dismissed in this draft.

Web scenario visibility: ash is tile 16, rendered as a dim gray ., while stone floor is a warmer brown .. The first trampled tile is hidden beneath @ until the player moves away. For an unmistakable local comparison, temporarily change the scenario's :fill from 1 to 2; ash . will then stand out against green grass ".

Test plan

Made with Cursor

mparrett and others added 4 commits July 22, 2026 08:21
Dev-scoped arenas that skip dungeon gen and boot the real play/dispatch
loop, so interaction bugs (starting with water+burning / #162) can be
reviewed interactively without hunting a seed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mparrett mparrett changed the title tool: scenariotest — EDN scenario → play-loop harness tool: scenariotest: EDN scenario + play-loop harness Jul 22, 2026
@mparrett
mparrett requested a review from nnunley July 22, 2026 16:45
@mparrett
mparrett marked this pull request as ready for review July 22, 2026 17:34
@mparrett
mparrett requested a review from nooga July 22, 2026 17:34
[(str "scenariotest: " (or (:name sc) "scenario"))]
(or (:log sc) [])
(when (:desc sc) [(:desc sc)])))
base {:terrain terrain

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is an indication that we should have a struct or type defined to represent world state, since this sort of empty initialization should be already set up on the default base world state.

@nnunley nnunley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does look like there's some common code that should be extracted to avoid duplication and risks of having replicated state, particularly at the base of the world state initialization. That said, this is still non-blocking.

@mparrett
mparrett merged commit 5c094fd into main Jul 23, 2026
4 checks passed
@mparrett
mparrett deleted the tool/scenariotest branch July 23, 2026 00:29
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-23 00:29 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants