mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
chore(maze): change default maze radius
This commit is contained in:
parent
3709bfa58d
commit
35e6420e68
@ -33,7 +33,7 @@ pub(super) fn spawn_floor(
|
|||||||
floor: target_floor,
|
floor: target_floor,
|
||||||
config: MazeConfig {
|
config: MazeConfig {
|
||||||
start_pos: config.end_pos,
|
start_pos: config.end_pos,
|
||||||
radius: config.radius + 2,
|
radius: config.radius + 1,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -79,7 +79,7 @@ impl MazeConfig {
|
|||||||
impl Default for MazeConfig {
|
impl Default for MazeConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(
|
Self::new(
|
||||||
8,
|
4,
|
||||||
HexOrientation::Flat,
|
HexOrientation::Flat,
|
||||||
None,
|
None,
|
||||||
&GlobalMazeConfig::default(),
|
&GlobalMazeConfig::default(),
|
||||||
@ -93,7 +93,6 @@ fn generate_pos<R: Rng>(radius: u16, rng: &mut R) -> Hex {
|
|||||||
loop {
|
loop {
|
||||||
let q = rng.gen_range(-radius..=radius);
|
let q = rng.gen_range(-radius..=radius);
|
||||||
let r = 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)
|
let s = -q - r; // Calculate third coordinate (axial coordinates: q + r + s = 0)
|
||||||
|
|
||||||
// Check if the position is within the hexagonal radius
|
// Check if the position is within the hexagonal radius
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user