SeaBattle/rust/sea_battle_backend/src/consts.rs

30 lines
890 B
Rust

//! # 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;
pub const MULTI_PLAYER_PLAYER_BOATS: [usize; 5] = [2, 3, 3, 4, 5];
pub const ALPHABET: &str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
pub const INVITE_CODE_LENGTH: usize = 5;
pub const MIN_PLAYER_NAME_LENGTH: usize = 1;
pub const MAX_PLAYER_NAME_LENGTH: usize = 10;
pub const MIN_STRIKE_TIMEOUT: usize = 5;
pub const MAX_STRIKE_TIMEOUT: usize = 90;