summaryrefslogtreecommitdiff
path: root/server/bot
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-06-03 20:00:18 +0200
committermetamuffin <metamuffin@disroot.org>2025-06-03 20:00:18 +0200
commitdb4587d3ec64b7e28691b43f9d9701939eed94d1 (patch)
tree1005017ea4a5d4e287024eaf08f876c7e34bfbdb /server/bot
parent9ee7eef2919feffe4e0695494d4027e8ec011808 (diff)
downloadhurrycurry-db4587d3ec64b7e28691b43f9d9701939eed94d1.tar
hurrycurry-db4587d3ec64b7e28691b43f9d9701939eed94d1.tar.bz2
hurrycurry-db4587d3ec64b7e28691b43f9d9701939eed94d1.tar.zst
update rust toolchain and rust dependencies.
`map_many_mut` and `trait_upcasting` was stabilized.
Diffstat (limited to 'server/bot')
-rw-r--r--server/bot/Cargo.toml12
-rw-r--r--server/bot/src/algos/customer.rs4
-rw-r--r--server/bot/src/algos/frank.rs4
3 files changed, 10 insertions, 10 deletions
diff --git a/server/bot/Cargo.toml b/server/bot/Cargo.toml
index 7f371867..7faa6b0f 100644
--- a/server/bot/Cargo.toml
+++ b/server/bot/Cargo.toml
@@ -6,9 +6,9 @@ edition = "2021"
[dependencies]
hurrycurry-client-lib = { path = "../client-lib", features = ["tokio-network"] }
hurrycurry-protocol = { path = "../protocol" }
-log = "0.4.22"
-anyhow = "1.0.89"
-env_logger = "0.11.5"
-rustls = { version = "0.23.13", features = ["ring"] }
-clap = { version = "4.5.18", features = ["derive"] }
-rand = "0.9.0-alpha.2"
+log = "0.4.27"
+anyhow = "1.0.98"
+env_logger = "0.11.8"
+rustls = { version = "0.23.27", features = ["ring"] }
+clap = { version = "4.5.39", features = ["derive"] }
+rand = "0.9.1"
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs
index b0ece9dd..9e7ae094 100644
--- a/server/bot/src/algos/customer.rs
+++ b/server/bot/src/algos/customer.rs
@@ -25,7 +25,7 @@ use hurrycurry_protocol::{
DemandIndex, Hand, Message, PacketS, PlayerClass, PlayerID, Score,
};
use log::info;
-use rand::{random, seq::IndexedRandom, thread_rng};
+use rand::{random, rng, seq::IndexedRandom};
#[derive(Debug, Clone, Default)]
pub struct Customer {
@@ -109,7 +109,7 @@ impl CustomerState {
.filter(|(_, t)| game.data.tile_name(t.kind) == "chair")
.map(|(p, _)| *p)
.collect::<Vec<_>>()
- .choose(&mut thread_rng())
+ .choose(&mut rng())
{
if let Some(path) = find_path(&game.walkable, pos.as_ivec2(), chair) {
info!("{me:?} -> entering");
diff --git a/server/bot/src/algos/frank.rs b/server/bot/src/algos/frank.rs
index 47b8ca7d..38ee927c 100644
--- a/server/bot/src/algos/frank.rs
+++ b/server/bot/src/algos/frank.rs
@@ -21,7 +21,7 @@ use crate::{
};
use hurrycurry_client_lib::Game;
use hurrycurry_protocol::{glam::Vec2, Message, PacketS, PlayerClass, PlayerID};
-use rand::{random, seq::IndexedRandom, thread_rng};
+use rand::{random, rng, seq::IndexedRandom};
#[derive(Default)]
pub struct Frank {
@@ -110,5 +110,5 @@ fn find_chef(game: &Game, me: PlayerID) -> Option<PlayerID> {
.filter(|(i, p)| p.class == PlayerClass::Chef && **i != me)
.map(|(i, _)| *i)
.collect::<Vec<_>>();
- chefs.choose(&mut thread_rng()).copied()
+ chefs.choose(&mut rng()).copied()
}