pub fn attack(&mut self) {
        let remaining_stamina = self.stats.stamina.value();
        if remaining_stamina >= self.weapon.weight() as _ {
            self.weapon_action = self.weapon.use_it(self.action.direction);
            self.blocking_direction = None;

            self.set_weapon_pos();
            self.stats.stamina.subtract(self.weapon.weight() as _);
        }
    }
// TODO: add stamina consumption when attacking, depending on the weight of the weapon!
add stamina consumption when attacking, depending on the weight of the weapon!
add stamina consumption when attacking depending on the weight of the weapon!
pub fn attack(&mut self) {
        let remaining_stamina = self.stats.stamina.value();
        if remaining_stamina >= self.weapon.weight() as _ {
            self.weapon_action = self.weapon.use_it(self.action.direction);
            self.blocking_direction = None;
            self.set_weapon_pos();
            self.stats.stamina.subtract(self.weapon.weight() as _);
        }
    }
pub fn attack ( & mut self ) { let remaining_stamina = self . stats . stamina . value ( ) ; if remaining_stamina >= self . weapon . weight ( ) as _ { self . weapon_action = self . weapon . use_it ( self . action . direction ) ; self . blocking_direction = None ; self . set_weapon_pos ( ) ; self . stats . stamina . subtract ( self . weapon . weight ( ) as _ ) ; } }
TODO: add stamina consumption when attacking, depending on the weight of the weapon!
TODO : add stamina consumption when attacking depending on the weight of the weapon!
&mut self