the huge refactor

This commit is contained in:
2026-07-24 21:52:05 -05:00
parent 5146cc9bcc
commit 917f4b1bf0
43 changed files with 1807 additions and 3267 deletions
+10 -9
View File
@@ -1,16 +1,17 @@
use crate::archetype::Archetype;
use crate::builtin::Archetype;
use crate::board::Board;
use crate::floor::Floor;
use crate::game::GameState;
use crate::glyph::Glyph;
use crate::utils::{Direction, PlayerPos, PortalDef};
use crate::utils::{Direction, PlayerPos};
use crate::world::World;
use std::cell::RefCell;
use std::collections::{BTreeMap, HashMap};
use std::rc::Rc;
use crate::portal::Portal;
/// Builds a 3×3 board with the player at `(px, py)` and the given portals.
fn make_board(px: i64, py: i64, portals: Vec<PortalDef>) -> Board {
fn make_board(px: i64, py: i64, portals: Vec<Portal>) -> Board {
Board {
name: "test".into(),
width: 3,
@@ -38,23 +39,23 @@ fn two_board_world() -> World {
let b1 = make_board(
0,
0,
vec![PortalDef {
vec![Portal {
name: "to_b2".into(),
x: 2,
y: 0,
target_map: "b2".into(),
target_entry: "from_b1".into(),
target_board: "b2".into(),
target_name: "from_b1".into(),
}],
);
let b2 = make_board(
0,
0,
vec![PortalDef {
vec![Portal {
name: "from_b1".into(),
x: 1,
y: 1,
target_map: "b1".into(),
target_entry: "to_b2".into(),
target_board: "b1".into(),
target_name: "to_b2".into(),
}],
);
World {