Element is replaced by two types: Behavior (a plain struct of runtime
properties: passable, opaque) and Archetype (an enum of named presets:
Empty, Wall, Object, ErrorBlock). Board.cells changes from Vec<(Glyph,
usize)> to Vec<(Glyph, Archetype)>, eliminating the per-board element
palette. Map files now reference archetypes by name (archetype = "wall")
instead of property bags (passable = false), so the archetype list can
be reordered without breaking saved games. Unknown archetype names
produce an ErrorBlock cell (yellow ? on red) so malformed maps are
immediately visible in-game.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All public types, fields, and functions in game.rs and map_file.rs now
have /// doc comments. main.rs has /// on App and draw_glyph plus inline
comments explaining the input/render pipeline. CLAUDE.md records the
expectation that generated code includes comments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the player-as-object goal and calls out the four specific
places in the current design (Board.player, player_start, try_move,
main.rs overlay) that will need to change when that's implemented.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the module structure, key design decisions and their reasons,
map file format design, what's not yet implemented, and ZZT background
for future development sessions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents all implemented modules, data structures, map file format,
and key design decisions made during this session.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces a map file format: TOML with a [palette] mapping characters
to (Glyph, Element) definitions and a [grid] multi-line string. Board
now owns the player position, objects, and portals. map_file::load()
deserializes a file and converts it to a Board via From<MapFile>.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accounts for egui's 8px CentralPanel margin in the minimum window size.
When the window is larger than the minimum, the board is centered in the
available area.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements Glyph (per-cell visual), Element (shared behavior palette),
and Board (60x25 grid of (Glyph, usize) cells). Player walks around
with arrow keys and is blocked by wall elements.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets up eframe/egui app with basic menu bar and placeholder viewport. Adds Rhai scripting dependency for future game object scripting system.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>