transition

This commit is contained in:
2026-06-13 18:43:29 -05:00
parent 6818f0545a
commit 299570bec8
6 changed files with 254 additions and 20 deletions
+9
View File
@@ -128,6 +128,15 @@ impl GameState {
&self.current_board_name
}
/// Returns a clone of the `Rc` for the active board.
///
/// Lets a front-end hold a reference to the current board across a board
/// transition — the old board stays alive in `world.boards`, so the clone
/// keeps it reachable even after `current_board_name` changes.
pub fn board_rc(&self) -> std::rc::Rc<std::cell::RefCell<Board>> {
self.world.boards[&self.current_board_name].clone()
}
/// Appends a styled message to the log.
pub fn log(&mut self, line: LogLine) {
self.log.push(line);