Reformat CRLF -> LF

This commit is contained in:
Pcornat 2022-10-30 13:16:10 +01:00
parent 8886c73316
commit b657e32cac
Signed by: Pcornat
GPG Key ID: 2F3932FF46D9ECA0

View File

@ -1,81 +1,82 @@
#[derive(Debug)] #[derive(Debug)]
pub enum Classe { pub enum Classe {
Warrior, Warrior,
Cautious, Cautious,
Farmer, Farmer,
Resourceful, Resourceful,
} }
#[derive(Debug)] #[derive(Debug)]
enum CharacteristicType { enum CharacteristicType {
Address, Address,
Stamina, Stamina,
Luck, Luck,
Skill, Skill,
} }
#[derive(Debug)] #[derive(Debug)]
pub struct CharacterSheet { pub struct CharacterSheet {
character_class: Classe, character_class: Classe,
name: String, /// Field to write the personality/
address: Characteristic, pub character: String,
stamina: Characteristic, address: Characteristic,
luck: Characteristic, stamina: Characteristic,
skill: Characteristic, luck: Characteristic,
health: u32, skill: Characteristic,
armor: u32, health: u32,
damage: u32, armor: u32,
glory: u32, damage: u32,
money: u32, glory: u32,
money: u32,
} }
#[derive(Debug)] #[derive(Debug)]
pub struct Characteristic { pub struct Characteristic {
characteristic_type: CharacteristicType, characteristic_type: CharacteristicType,
pub base: u32, pub base: u32,
pub carac: u32, pub carac: u32,
pub materiel: u32, pub materiel: u32,
pub additional: u32, pub additional: u32,
} }
impl Default for CharacterSheet { impl Default for CharacterSheet {
fn default() -> Self { fn default() -> Self {
Self { Self {
character_class: Classe::Warrior, character_class: Classe::Warrior,
name: "Billy".to_string(), character: "Billy".to_string(),
address: Characteristic { address: Characteristic {
characteristic_type: CharacteristicType::Address, characteristic_type: CharacteristicType::Address,
base: 0, base: 0,
carac: 0, carac: 0,
materiel: 0, materiel: 0,
additional: 1, additional: 1,
}, },
stamina: Characteristic { stamina: Characteristic {
characteristic_type: CharacteristicType::Stamina, characteristic_type: CharacteristicType::Stamina,
base: 2, base: 2,
carac: 0, carac: 0,
materiel: 0, materiel: 0,
additional: 0, additional: 0,
}, },
luck: Characteristic { luck: Characteristic {
characteristic_type: CharacteristicType::Luck, characteristic_type: CharacteristicType::Luck,
base: 3, base: 3,
carac: 0, carac: 0,
materiel: 0, materiel: 0,
additional: 0, additional: 0,
}, },
skill: Characteristic { skill: Characteristic {
characteristic_type: CharacteristicType::Skill, characteristic_type: CharacteristicType::Skill,
base: 2, base: 2,
carac: 0, carac: 0,
materiel: 0, materiel: 0,
additional: 0, additional: 0,
}, },
health: 0, health: 0,
armor: 0, armor: 0,
damage: 0, damage: 0,
glory: 0, glory: 0,
money: 0, money: 0,
} }
} }
} }