pub struct GameConfig {
pub board_size: usize,
pub target_score: u32,
pub allow_undo: bool,
pub seed: Option<u64>,
}
Expand description
Game configuration
Fields§
§board_size: usize
Board size (default: 4)
target_score: u32
Target score to win (default: 2048)
allow_undo: bool
Whether to allow undo (default: true)
seed: Option<u64>
Random seed for reproducible games
Trait Implementations§
Source§impl Clone for GameConfig
impl Clone for GameConfig
Source§fn clone(&self) -> GameConfig
fn clone(&self) -> GameConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GameConfig
impl Debug for GameConfig
Source§impl Default for GameConfig
impl Default for GameConfig
Source§impl<'de> Deserialize<'de> for GameConfig
impl<'de> Deserialize<'de> for GameConfig
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 GameConfig
impl RefUnwindSafe for GameConfig
impl Send for GameConfig
impl Sync for GameConfig
impl Unpin for GameConfig
impl UnwindSafe for GameConfig
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