diff options
author | Anthony Wang | 2024-03-26 17:08:23 -0500 |
---|---|---|
committer | Anthony Wang | 2024-03-26 17:08:23 -0500 |
commit | 0c235bdf58c1c561461e3d49a79cd5d30bd8854b (patch) | |
tree | bad20060d747685c1e108a02072f04d3e7682f21 /main.rs | |
parent | cac8bed72c82d1b568785b3476a2edfb1be83142 (diff) |
Use Xoshiro256PlusPlus so RNG is deterministic, add leaderboard
Diffstat (limited to 'main.rs')
-rw-r--r-- | main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,7 @@ use rand::seq::SliceRandom; -use rand::thread_rng; use rand::Rng; +use rand_xoshiro::rand_core::SeedableRng; +use rand_xoshiro::Xoshiro256PlusPlus; use std::collections::HashMap; use std::fs::File; use std::io::Write; @@ -245,7 +246,7 @@ fn main() -> std::io::Result<()> { ), ]); let ans = "HAPPYAPRILFOOLSDAY202441🙂"; - let mut rng = thread_rng(); + let mut rng = Xoshiro256PlusPlus::seed_from_u64(202441); let mut file = File::create("index.html")?; writeln!(file, "<!DOCTYPE html><!--{}-->", header)?; for c in ans.chars() { @@ -268,5 +269,6 @@ fn main() -> std::io::Result<()> { )?; } } + writeln!(file, "<!--Leaderboard: None so far-->")?; Ok(()) } |