the huge refactor
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user