From 7ab9d753ed20ebbdffbd3a377142ee699d610640 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Sat, 24 Sep 2022 12:31:07 +0200 Subject: [PATCH] Make sure name returned by bot correspond to its type --- sea_battle_backend/src/bot_player.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sea_battle_backend/src/bot_player.rs b/sea_battle_backend/src/bot_player.rs index f03b4f1..b5afb48 100644 --- a/sea_battle_backend/src/bot_player.rs +++ b/sea_battle_backend/src/bot_player.rs @@ -23,7 +23,12 @@ impl BotPlayer { impl Player for BotPlayer { fn get_name(&self) -> &str { - "Intermediate Bot" + match self.kind { + BotType::Random => "Random bot", + BotType::Linear => "Linear bot", + BotType::Intermediate => "Intermediate bot", + BotType::Smart => "Smart bot", + } } fn get_uid(&self) -> Uuid {