Adding getters.
This commit is contained in:
parent
b657e32cac
commit
4ed370d51f
36
src/sheet.rs
36
src/sheet.rs
@ -30,6 +30,42 @@ pub struct CharacterSheet {
|
||||
money: u32,
|
||||
}
|
||||
|
||||
impl CharacterSheet {
|
||||
pub fn character_class(&self) -> &Classe {
|
||||
&self.character_class
|
||||
}
|
||||
pub fn character(&self) -> &str {
|
||||
&self.character
|
||||
}
|
||||
pub fn address(&self) -> &Characteristic {
|
||||
&self.address
|
||||
}
|
||||
pub fn stamina(&self) -> &Characteristic {
|
||||
&self.stamina
|
||||
}
|
||||
pub fn luck(&self) -> &Characteristic {
|
||||
&self.luck
|
||||
}
|
||||
pub fn skill(&self) -> &Characteristic {
|
||||
&self.skill
|
||||
}
|
||||
pub fn health(&self) -> u32 {
|
||||
self.health
|
||||
}
|
||||
pub fn armor(&self) -> u32 {
|
||||
self.armor
|
||||
}
|
||||
pub fn damage(&self) -> u32 {
|
||||
self.damage
|
||||
}
|
||||
pub fn glory(&self) -> u32 {
|
||||
self.glory
|
||||
}
|
||||
pub fn money(&self) -> u32 {
|
||||
self.money
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Characteristic {
|
||||
characteristic_type: CharacteristicType,
|
||||
|
Loading…
Reference in New Issue
Block a user