pub fn validate(&self) -> Result<(), String> {
        check_cards::check_cards(&self)?;
        check_foundations::check_foundations(&self)?;
        Ok(())
    }
/// Checks whether a game state is valid, i.e.
/// - each of the 52 cards exists exactly once
/// - each card on a foundation is of the correct suit
/// - the cards on each foundation are ordered correctly
///
/// # Examples
///
/// ```
/// // TODO [v1] Add code examples (once FromStr is implemented for GameState)
/// ```
// TODO [med priority] needs more tests
Checks whether a game state is valid, i.e.
each of the 52 cards exists exactly once
each card on a foundation is of the correct suit
the cards on each foundation are ordered correctly
Checks whether a game state is valid i . e . each of the 52 cards exists exactly once each card on a foundation is of the correct suit the cards on each foundation are ordered correctly
pub fn validate(&self) -> Result<(), String> {
        check_cards::check_cards(&self)?;
        check_foundations::check_foundations(&self)?;
        Ok(())
    }
pub fn validate ( & self ) -> Result < ( ) , String > { check_cards :: check_cards ( & self ) ? ; check_foundations :: check_foundations ( & self ) ? ; Ok ( ( ) ) }
Checks whether a game state is valid, i.e.
Checks whether a game state is valid i . e .
&self
&self
examples
```
TODO [v1] Add code examples (once FromStr is implemented for GameState)
```
TODO [med priority] needs more tests
` ` ` TODO [ v1 ] Add code examples ( once FromStr is implemented for GameState ) ` ` ` TODO [ med priority ] needs more tests