fn apply_effects(&self) -> GameResult {
        let game = *self;

        let game = if game.poison_effect > 0 {
            GameState {
                boss_hp: game.boss_hp.saturating_sub(3),
                poison_effect: game.poison_effect - 1,
                ..game
            }
        } else {
            game
        };

        let game = if game.shield_effect > 0 {
            GameState {
                shield_effect: game.shield_effect - 1,
                ..game
            }
        } else {
            game
        };

        let game = if game.recharge_effect > 0 {
            GameState {
                hero_mana: game.hero_mana + 101,
                recharge_effect: game.recharge_effect - 1,
                ..game
            }
        } else {
            game
        };

        game.outcome()
    }
/// Apply any active effects and reduce any active timers
Apply any active effects and reduce any active timers
Apply any active effects and reduce any active timers
fn apply_effects(&self) -> GameResult {
        let game = *self;
        let game = if game.poison_effect > 0 {
            GameState {
                boss_hp: game.boss_hp.saturating_sub(3),
                poison_effect: game.poison_effect - 1,
                ..game
            }
        } else {
            game
        };
        let game = if game.shield_effect > 0 {
            GameState {
                shield_effect: game.shield_effect - 1,
                ..game
            }
        } else {
            game
        };
        let game = if game.recharge_effect > 0 {
            GameState {
                hero_mana: game.hero_mana + 101,
                recharge_effect: game.recharge_effect - 1,
                ..game
            }
        } else {
            game
        };
        game.outcome()
    }
fn apply_effects ( & self ) -> GameResult { let game = * self ; let game = if game . poison_effect > 0 { GameState { boss_hp : game . boss_hp . saturating_sub ( 3 ) , poison_effect : game . poison_effect - 1 , .. game } } else { game } ; let game = if game . shield_effect > 0 { GameState { shield_effect : game . shield_effect - 1 , .. game } } else { game } ; let game = if game . recharge_effect > 0 { GameState { hero_mana : game . hero_mana + 101 , recharge_effect : game . recharge_effect - 1 , .. game } } else { game } ; game . outcome ( ) }
Apply any active effects and reduce any active timers
Apply any active effects and reduce any active timers
&self
&self