new layer model

This commit is contained in:
2026-07-10 23:16:28 -05:00
parent 325d2c27dd
commit ad95a9cd8d
36 changed files with 1040 additions and 897 deletions
+4 -6
View File
@@ -1,8 +1,8 @@
use crate::archetype::Archetype;
use crate::board::Board;
use crate::floor::Floor;
use crate::game::GameState;
use crate::glyph::Glyph;
use crate::layer::Layer;
use crate::utils::{Direction, PlayerPos, PortalDef};
use crate::world::World;
use std::cell::RefCell;
@@ -15,9 +15,9 @@ fn make_board(px: i64, py: i64, portals: Vec<PortalDef>) -> Board {
name: "test".into(),
width: 3,
height: 3,
layers: vec![Layer {
cells: vec![(Glyph::transparent(), Archetype::Empty); 9],
}],
grid: vec![(Glyph::transparent(), Archetype::Empty); 9],
floor: Floor::Blank,
decorations: Vec::new(),
player: PlayerPos { x: px, y: py },
objects: BTreeMap::new(),
next_object_id: 1,
@@ -40,7 +40,6 @@ fn two_board_world() -> World {
name: "to_b2".into(),
x: 2,
y: 0,
z: 0,
target_map: "b2".into(),
target_entry: "from_b1".into(),
}],
@@ -52,7 +51,6 @@ fn two_board_world() -> World {
name: "from_b1".into(),
x: 1,
y: 1,
z: 0,
target_map: "b1".into(),
target_entry: "to_b2".into(),
}],