From 35e6420e68593cbee9f9b8af5d8186df687ffe9f Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 5 Jan 2025 18:47:23 +0200 Subject: [PATCH] chore(maze): change default maze radius --- src/floor/systems/spawn.rs | 2 +- src/maze/components.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/floor/systems/spawn.rs b/src/floor/systems/spawn.rs index 445a12f..e59cfbb 100644 --- a/src/floor/systems/spawn.rs +++ b/src/floor/systems/spawn.rs @@ -33,7 +33,7 @@ pub(super) fn spawn_floor( floor: target_floor, config: MazeConfig { start_pos: config.end_pos, - radius: config.radius + 2, + radius: config.radius + 1, ..default() }, }); diff --git a/src/maze/components.rs b/src/maze/components.rs index 1bd7f8a..c3731d2 100644 --- a/src/maze/components.rs +++ b/src/maze/components.rs @@ -79,7 +79,7 @@ impl MazeConfig { impl Default for MazeConfig { fn default() -> Self { Self::new( - 8, + 4, HexOrientation::Flat, None, &GlobalMazeConfig::default(), @@ -93,7 +93,6 @@ fn generate_pos(radius: u16, rng: &mut R) -> Hex { loop { let q = rng.gen_range(-radius..=radius); let r = rng.gen_range(-radius..=radius); - let s = -q - r; // Calculate third coordinate (axial coordinates: q + r + s = 0) // Check if the position is within the hexagonal radius