Reformat CRLF -> LF
This commit is contained in:
parent
8886c73316
commit
b657e32cac
127
src/sheet.rs
127
src/sheet.rs
@ -1,81 +1,82 @@
|
||||
#[derive(Debug)]
|
||||
pub enum Classe {
|
||||
Warrior,
|
||||
Cautious,
|
||||
Farmer,
|
||||
Resourceful,
|
||||
Warrior,
|
||||
Cautious,
|
||||
Farmer,
|
||||
Resourceful,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum CharacteristicType {
|
||||
Address,
|
||||
Stamina,
|
||||
Luck,
|
||||
Skill,
|
||||
Address,
|
||||
Stamina,
|
||||
Luck,
|
||||
Skill,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CharacterSheet {
|
||||
character_class: Classe,
|
||||
name: String,
|
||||
address: Characteristic,
|
||||
stamina: Characteristic,
|
||||
luck: Characteristic,
|
||||
skill: Characteristic,
|
||||
health: u32,
|
||||
armor: u32,
|
||||
damage: u32,
|
||||
glory: u32,
|
||||
money: u32,
|
||||
character_class: Classe,
|
||||
/// Field to write the personality/
|
||||
pub character: String,
|
||||
address: Characteristic,
|
||||
stamina: Characteristic,
|
||||
luck: Characteristic,
|
||||
skill: Characteristic,
|
||||
health: u32,
|
||||
armor: u32,
|
||||
damage: u32,
|
||||
glory: u32,
|
||||
money: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Characteristic {
|
||||
characteristic_type: CharacteristicType,
|
||||
pub base: u32,
|
||||
pub carac: u32,
|
||||
pub materiel: u32,
|
||||
pub additional: u32,
|
||||
characteristic_type: CharacteristicType,
|
||||
pub base: u32,
|
||||
pub carac: u32,
|
||||
pub materiel: u32,
|
||||
pub additional: u32,
|
||||
}
|
||||
|
||||
impl Default for CharacterSheet {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
character_class: Classe::Warrior,
|
||||
name: "Billy".to_string(),
|
||||
address: Characteristic {
|
||||
characteristic_type: CharacteristicType::Address,
|
||||
base: 0,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 1,
|
||||
},
|
||||
stamina: Characteristic {
|
||||
characteristic_type: CharacteristicType::Stamina,
|
||||
base: 2,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
luck: Characteristic {
|
||||
characteristic_type: CharacteristicType::Luck,
|
||||
base: 3,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
skill: Characteristic {
|
||||
characteristic_type: CharacteristicType::Skill,
|
||||
base: 2,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
health: 0,
|
||||
armor: 0,
|
||||
damage: 0,
|
||||
glory: 0,
|
||||
money: 0,
|
||||
}
|
||||
}
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
character_class: Classe::Warrior,
|
||||
character: "Billy".to_string(),
|
||||
address: Characteristic {
|
||||
characteristic_type: CharacteristicType::Address,
|
||||
base: 0,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 1,
|
||||
},
|
||||
stamina: Characteristic {
|
||||
characteristic_type: CharacteristicType::Stamina,
|
||||
base: 2,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
luck: Characteristic {
|
||||
characteristic_type: CharacteristicType::Luck,
|
||||
base: 3,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
skill: Characteristic {
|
||||
characteristic_type: CharacteristicType::Skill,
|
||||
base: 2,
|
||||
carac: 0,
|
||||
materiel: 0,
|
||||
additional: 0,
|
||||
},
|
||||
health: 0,
|
||||
armor: 0,
|
||||
damage: 0,
|
||||
glory: 0,
|
||||
money: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user