SeaBattle/rust/sea_battle_backend/src/consts.rs

30 lines
886 B
Rust
Raw Normal View History

2022-09-10 13:02:45 +00:00
//! # Project constants
pub const MIN_BOATS_NUMBER: usize = 1;
pub const MAX_BOATS_NUMBER: usize = 10;
pub const MIN_BOATS_LENGTH: usize = 1;
pub const MAX_BOATS_LENGTH: usize = 6;
pub const MIN_MAP_WIDTH: usize = 5;
pub const MAX_MAP_WIDTH: usize = 26;
pub const MIN_MAP_HEIGHT: usize = 5;
pub const MAX_MAP_HEIGHT: usize = 26;
pub const MULTI_PLAYER_MAP_WIDTH: usize = 10;
pub const MULTI_PLAYER_MAP_HEIGHT: usize = 10;
pub const MULTI_PLAYER_BOATS_CAN_TOUCH: bool = true;
pub const MULTI_PLAYER_PLAYER_CAN_CONTINUE_AFTER_HIT: bool = true;
2022-09-11 14:48:20 +00:00
pub const MULTI_PLAYER_PLAYER_BOATS: [usize; 5] = [2, 3, 3, 4, 5];
2022-09-15 15:37:26 +00:00
pub const ALPHABET: &str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
2022-09-24 09:46:12 +00:00
pub const INVITE_CODE_LENGTH: usize = 5;
2022-10-16 16:51:05 +00:00
pub const MIN_PLAYER_NAME_LENGTH: usize = 1;
pub const MAX_PLAYER_NAME_LENGTH: usize = 10;
2022-10-17 05:42:17 +00:00
pub const MIN_STRIKE_TIMEOUT: u64 = 5;
pub const MAX_STRIKE_TIMEOUT: u64 = 90;