chore(maze): change default maze radius

This commit is contained in:
Kristofers Solo 2025-01-05 18:47:23 +02:00
parent 3709bfa58d
commit 35e6420e68
2 changed files with 2 additions and 3 deletions

View File

@ -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()
},
});

View File

@ -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<R: Rng>(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