Files
kiln/CLAUDE.md
T

31 lines
1.2 KiB
Markdown
Raw Normal View History

2026-05-15 23:42:14 -05:00
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project
`viberogue` is a roguelike game written in Rust (edition 2024). It is in early development with no dependencies yet.
## Commands
```bash
cargo build # compile
cargo run # build and run
cargo test # run all tests
cargo test <name> # run a single test by name (substring match)
cargo clippy # lint
cargo fmt # format
```
## Architecture
The game is a single Rust binary using **eframe 0.33 / egui 0.33** for the GUI. eframe drives a retained-mode UI: the `App::update` method is called every frame and is responsible for both drawing and responding to input.
`update` is structured in two panels:
- `egui::TopBottomPanel::top` — menu bar (File → Exit)
- `egui::CentralPanel::default` — game viewport; use `ui.painter()` to draw directly
As the codebase grows, game state will live on the `App` struct and game logic will be split into modules under `src/` (map generation, entities, etc.). Keep game logic separate from the egui drawing calls in `update`.
eframe runs on its own event loop thread; do not assume single-threaded execution.