diff --git a/crates/border-wars/src/map/generation.rs b/crates/border-wars/src/map/generation.rs index 9efd643..2d320ca 100644 --- a/crates/border-wars/src/map/generation.rs +++ b/crates/border-wars/src/map/generation.rs @@ -28,7 +28,7 @@ pub struct StartMapGeneration { pub seed: u32, /// The radius of the map. - pub radius: usize, + pub radius: u16, } /// An event send when the map is generated. @@ -41,12 +41,12 @@ fn generate_map( mut end_map_event: EventWriter, mut commands: Commands, mut noise: Local>, - mut map_iterator: Local>>, + mut map_iterator: Local>>, ) { // Handle map generation events. for event in event.read() { *noise = Some(Perlin::new(event.seed)); - *map_iterator = Some(HexPosition(0, 0).spiral(event.radius)); + *map_iterator = Some(HexPosition(0, 0).spiral(event.radius as usize)); } if let (Some(perlin), Some(spiral)) = (noise.as_ref(), map_iterator.as_mut()) {