Limit player name length

This commit is contained in:
2022-10-16 18:51:05 +02:00
parent e0132b68ed
commit b1145cc362
5 changed files with 31 additions and 1 deletions
rust
cli_player
sea_battle_backend

@ -57,6 +57,8 @@ pub struct PlayConfiguration {
pub max_boats_number: usize,
pub bot_types: &'static [BotDescription],
pub ordinate_alphabet: &'static str,
pub min_player_name_len: usize,
pub max_player_name_len: usize,
}
impl Default for PlayConfiguration {
@ -72,6 +74,8 @@ impl Default for PlayConfiguration {
max_boats_number: MAX_BOATS_NUMBER,
bot_types: &BOTS_TYPES,
ordinate_alphabet: ALPHABET,
min_player_name_len: MIN_PLAYER_NAME_LENGTH,
max_player_name_len: MAX_PLAYER_NAME_LENGTH,
}
}
}