#[non_exhaustive]pub struct GameConfig {
pub start_level: u16,
pub lines_for_level: u16,
pub field_width: i16,
pub field_height: i16,
pub preview_stone_count: u8,
pub enable_ai: bool,
pub enable_dark_mode: bool,
}
Expand description
The configuration for a Game
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.start_level: u16
The level the game starts at.
lines_for_level: u16
The number of lines cleared required to level up.
field_width: i16
The width of the tetris field.
field_height: i16
The height of the tetris field.
preview_stone_count: u8
The number of upcoming stones to show.
enable_ai: bool
Whether or not the AI is enabled initially.
enable_dark_mode: bool
Whether or not to use dark mode by default.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more