Stephen Seo
89a12623b4
Can select from three difficulties, and the AI makes their move when it is their turn. AI probably still needs some tweaking..
6 lines
163 B
Rust
6 lines
163 B
Rust
use js_sys::Math::random;
|
|
use oorandom::Rand32;
|
|
|
|
pub fn get_seeded_random() -> Result<Rand32, String> {
|
|
Ok(Rand32::new((random() * u64::MAX as f64) as u64))
|
|
}
|