fn outcome(self) -> GameResult {
        if self.boss_hp == 0 {
            Err(Outcome::Win(self.total_mana))
        } else if self.hero_hp == 0 {
            Err(Outcome::Lose)
        } else {
            // continue playing
            Ok(self)
        }
    }
/// Check the outcome of the current game state
Check the outcome of the current game state
Check the outcome of the current game state
fn outcome(self) -> GameResult {
        if self.boss_hp == 0 {
            Err(Outcome::Win(self.total_mana))
        } else if self.hero_hp == 0 {
            Err(Outcome::Lose)
        } else {
            // continue playing
            Ok(self)
        }
    }
fn outcome ( self ) -> GameResult { if self . boss_hp == 0 { Err ( Outcome :: Win ( self . total_mana ) ) } else if self . hero_hp == 0 { Err ( Outcome :: Lose ) } else { // continue playing Ok ( self ) } }
Check the outcome of the current game state
Check the outcome of the current game state
self
self