mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-17 14:12:40 -06:00
feat: use smallrng for emscripten compat
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
//! This module defines the game map and provides functions for interacting with it.
|
||||
use rand::rngs::SmallRng;
|
||||
use rand::seq::IteratorRandom;
|
||||
use rand::SeedableRng;
|
||||
|
||||
use crate::constants::{MapTile, BOARD_OFFSET, CELL_SIZE};
|
||||
use crate::constants::{BOARD_HEIGHT, BOARD_WIDTH};
|
||||
@@ -120,7 +122,7 @@ impl Map {
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut rng = rand::rng();
|
||||
let mut rng = SmallRng::from_os_rng();
|
||||
let &start = pellet_positions
|
||||
.iter()
|
||||
.choose(&mut rng)
|
||||
|
||||
Reference in New Issue
Block a user