Starting trial event code, New/Updated Characters
This commit is contained in:
@@ -1,10 +1,48 @@
|
|||||||
#[derive(Debug)]
|
use rand::distributions::{Distribution, Standard};
|
||||||
|
|
||||||
|
use crate::Gamemode;
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
pub struct Character {
|
pub struct Character {
|
||||||
pub name: &'static str,
|
pub name: &'static str,
|
||||||
pub standing: Standing
|
pub standing: Standing
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
impl Character {
|
||||||
|
pub fn build_player(gamemode: Gamemode) -> Character {
|
||||||
|
Character {
|
||||||
|
name: "You",
|
||||||
|
standing: match gamemode {
|
||||||
|
Gamemode::Abigail => Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 10,
|
||||||
|
friends: vec![],
|
||||||
|
enemies: vec![]
|
||||||
|
},
|
||||||
|
Gamemode::MaryWarren => Standing {
|
||||||
|
society: 5,
|
||||||
|
court: 5,
|
||||||
|
friends: vec![],
|
||||||
|
enemies: vec![]
|
||||||
|
},
|
||||||
|
Gamemode::JohnProctor => Standing {
|
||||||
|
society: 2,
|
||||||
|
court: 2,
|
||||||
|
friends: vec![],
|
||||||
|
enemies: vec![]
|
||||||
|
},
|
||||||
|
Gamemode::GoodyOsborne => Standing {
|
||||||
|
society: -15,
|
||||||
|
court: -5,
|
||||||
|
friends: vec![],
|
||||||
|
enemies: vec![]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
pub struct Standing {
|
pub struct Standing {
|
||||||
pub society: i8,
|
pub society: i8,
|
||||||
pub court: i8,
|
pub court: i8,
|
||||||
@@ -38,7 +76,6 @@ pub enum People {
|
|||||||
ElizabethProctor(Option<Character>),
|
ElizabethProctor(Option<Character>),
|
||||||
EzekielCheever(Option<Character>),
|
EzekielCheever(Option<Character>),
|
||||||
FrancisNurse(Option<Character>),
|
FrancisNurse(Option<Character>),
|
||||||
RebeccaNurse(Option<Character>),
|
|
||||||
GilesCorey(Option<Character>),
|
GilesCorey(Option<Character>),
|
||||||
GoodyOsborne(Option<Character>),
|
GoodyOsborne(Option<Character>),
|
||||||
JohnProctor(Option<Character>),
|
JohnProctor(Option<Character>),
|
||||||
@@ -47,6 +84,7 @@ pub enum People {
|
|||||||
MarshalHerrick(Option<Character>),
|
MarshalHerrick(Option<Character>),
|
||||||
MarthaCorey(Option<Character>),
|
MarthaCorey(Option<Character>),
|
||||||
MercyLewis(Option<Character>),
|
MercyLewis(Option<Character>),
|
||||||
|
RebeccaNurse(Option<Character>),
|
||||||
ReverendParris(Option<Character>),
|
ReverendParris(Option<Character>),
|
||||||
ReverendJohnHale(Option<Character>),
|
ReverendJohnHale(Option<Character>),
|
||||||
SarahGood(Option<Character>),
|
SarahGood(Option<Character>),
|
||||||
@@ -55,8 +93,217 @@ pub enum People {
|
|||||||
Tituba(Option<Character>)
|
Tituba(Option<Character>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl People {
|
||||||
|
pub fn build_characters() -> Vec<People> {
|
||||||
|
vec![
|
||||||
|
People::AbigailWilliams(Some(Character {
|
||||||
|
name: "Abigail Williams",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 10,
|
||||||
|
friends: vec![
|
||||||
|
&People::BettyParris(None),
|
||||||
|
&People::DeputyGovernorDanforth(None),
|
||||||
|
&People::ReverendParris(None),
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::ElizabethProctor(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::ReverendJohnHale(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::AnnPutnam(Some(Character {
|
||||||
|
name: "Ann Putnam",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 7,
|
||||||
|
friends: vec![
|
||||||
|
&People::BettyParris(None),
|
||||||
|
&People::ThomasPutnam(None),
|
||||||
|
&People::ReverendParris(None),
|
||||||
|
&People::MercyLewis(None)
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::ElizabethProctor(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::RebeccaNurse(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::BettyParris(Some(Character {
|
||||||
|
name: "Betty Parris",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 10,
|
||||||
|
friends: vec![
|
||||||
|
&People::AbigailWilliams(None),
|
||||||
|
&People::ReverendParris(None)
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::ElizabethProctor(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::DeputyGovernorDanforth(Some(Character {
|
||||||
|
name: "Deputy Governor Danforth",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 100,
|
||||||
|
friends: vec![
|
||||||
|
&People::AbigailWilliams(None),
|
||||||
|
&People::JudgeHathorne(None),
|
||||||
|
&People::ReverendParris(None),
|
||||||
|
&People::EzekielCheever(None),
|
||||||
|
&People::MarshalHerrick(None)
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::ElizabethProctor(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::ReverendJohnHale(None),
|
||||||
|
&People::FrancisNurse(None),
|
||||||
|
&People::GilesCorey(None),
|
||||||
|
&People::MarthaCorey(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::ElizabethProctor(Some(Character{
|
||||||
|
name: "Elizabeth Proctor",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 5,
|
||||||
|
friends: vec![
|
||||||
|
&People::FrancisNurse(None),
|
||||||
|
&People::GilesCorey(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::RebeccaNurse(None),
|
||||||
|
&People::ReverendJohnHale(None)
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::AbigailWilliams(None),
|
||||||
|
&People::DeputyGovernorDanforth(None),
|
||||||
|
&People::EzekielCheever(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::EzekielCheever(Some(Character {
|
||||||
|
name: "Ezekiel Cheever",
|
||||||
|
standing: Standing {
|
||||||
|
society: 12,
|
||||||
|
court: 50,
|
||||||
|
friends: vec![
|
||||||
|
&People::MarshalHerrick(None),
|
||||||
|
&People::DeputyGovernorDanforth(None),
|
||||||
|
&People::ReverendParris(None),
|
||||||
|
&People::ReverendJohnHale(None),
|
||||||
|
&People::JudgeHathorne(None)
|
||||||
|
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::ElizabethProctor(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::FrancisNurse(None),
|
||||||
|
&People::GilesCorey(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::FrancisNurse(Some(Character {
|
||||||
|
name: "Francis Nurse",
|
||||||
|
standing: Standing {
|
||||||
|
society: 10,
|
||||||
|
court: 10,
|
||||||
|
friends: vec![
|
||||||
|
&People::RebeccaNurse(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::GilesCorey(None),
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::AnnPutnam(None),
|
||||||
|
&People::AbigailWilliams(None),
|
||||||
|
&People::ReverendJohnHale(None),
|
||||||
|
&People::JudgeHathorne(None),
|
||||||
|
&People::ThomasPutnam(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::RebeccaNurse(Some(Character {
|
||||||
|
name: "Rebecca Nurse",
|
||||||
|
standing: Standing {
|
||||||
|
society: 20,
|
||||||
|
court: 8,
|
||||||
|
friends: vec![
|
||||||
|
&People::ElizabethProctor(None),
|
||||||
|
&People::FrancisNurse(None),
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::MarthaCorey(None),
|
||||||
|
&People::GilesCorey(None)
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::ThomasPutnam(None),
|
||||||
|
&People::AnnPutnam(None),
|
||||||
|
&People::ReverendJohnHale(None),
|
||||||
|
&People::JudgeHathorne(None),
|
||||||
|
&People::EzekielCheever(None),
|
||||||
|
&People::MarshalHerrick(None),
|
||||||
|
&People::AbigailWilliams(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
People::GilesCorey(Some(Character {
|
||||||
|
name: "Giles Corey",
|
||||||
|
standing: Standing {
|
||||||
|
society: 2,
|
||||||
|
court: 5,
|
||||||
|
friends: vec![
|
||||||
|
&People::JohnProctor(None),
|
||||||
|
&People::MarthaCorey(None),
|
||||||
|
&People::FrancisNurse(None),
|
||||||
|
],
|
||||||
|
enemies: vec![
|
||||||
|
&People::EzekielCheever(None),
|
||||||
|
&People::JudgeHathorne(None),
|
||||||
|
&People::ReverendJohnHale(None),
|
||||||
|
&People::MarshalHerrick(None)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Distribution<People> for Standard {
|
||||||
|
fn sample<R: rand::Rng + ?Sized>(&self, rng: &mut R) -> People {
|
||||||
|
match rng.gen_range(0..=21) {
|
||||||
|
0 => People::AbigailWilliams(None),
|
||||||
|
1 => People::AnnPutnam(None),
|
||||||
|
2 => People::BettyParris(None),
|
||||||
|
3 => People::DeputyGovernorDanforth(None),
|
||||||
|
4 => People::ElizabethProctor(None),
|
||||||
|
5 => People::EzekielCheever(None),
|
||||||
|
6 => People::FrancisNurse(None),
|
||||||
|
7 => People::GilesCorey(None),
|
||||||
|
8 => People::GoodyOsborne(None),
|
||||||
|
9 => People::JohnProctor(None),
|
||||||
|
10 => People::JudgeHathorne(None),
|
||||||
|
11 => People::MarshalHerrick(None),
|
||||||
|
12 => People::MarthaCorey(None),
|
||||||
|
13 => People::MaryWarren(None),
|
||||||
|
14 => People::RebeccaNurse(None),
|
||||||
|
15 => People::ReverendJohnHale(None),
|
||||||
|
16 => People::ReverendParris(None),
|
||||||
|
18 => People::SarahGood(None),
|
||||||
|
19 => People::SusannaWalcott(None),
|
||||||
|
20 => People::ThomasPutnam(None),
|
||||||
|
21 => People::Tituba(None),
|
||||||
|
_ => unreachable!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum SurvivalStatus {
|
pub enum SurvivalStatus {
|
||||||
|
PlayerMassacred,
|
||||||
PlayerLived,
|
PlayerLived,
|
||||||
PlayerDied
|
PlayerDied
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,85 @@
|
|||||||
|
use std::i8;
|
||||||
|
|
||||||
|
use rand::{
|
||||||
|
distributions::{Distribution, Standard},
|
||||||
|
rngs::ThreadRng
|
||||||
|
};
|
||||||
|
|
||||||
use crate::characters::{
|
use crate::characters::{
|
||||||
Character,
|
Character,
|
||||||
|
People,
|
||||||
SurvivalStatus
|
SurvivalStatus
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn get_event() {}
|
pub fn get_event() -> Events {
|
||||||
|
Events::Trial(Trial)
|
||||||
|
}
|
||||||
|
|
||||||
pub struct Trial;
|
#[allow(unused_variables)]
|
||||||
|
pub trait EventHandle {
|
||||||
impl Trial {
|
fn handle<'main>(
|
||||||
pub fn handle(&self, &mut player: &mut Character) -> SurvivalStatus {
|
self: &Self,
|
||||||
let player_status = SurvivalStatus::PlayerDied;
|
rng: &'main ThreadRng,
|
||||||
|
player: &'main mut Character,
|
||||||
player_status
|
characters: &'main mut Vec<People>
|
||||||
|
) -> EventReturn {
|
||||||
|
EventReturn::None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct Trial;
|
||||||
|
|
||||||
|
impl EventHandle for Trial {
|
||||||
|
fn handle<'main>(
|
||||||
|
self: &Self,
|
||||||
|
rng: &'main ThreadRng,
|
||||||
|
player: &'main mut Character,
|
||||||
|
characters: &'main mut Vec<People>
|
||||||
|
) -> EventReturn {
|
||||||
|
let mut player_status = SurvivalStatus::PlayerDied;
|
||||||
|
|
||||||
|
println!("You have been summoned before the court.\n");
|
||||||
|
|
||||||
|
if player.standing.clone().calculate() >= {0 as i8} {
|
||||||
|
player_status = SurvivalStatus::PlayerLived
|
||||||
|
}
|
||||||
|
|
||||||
|
EventReturn::Survival(player_status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct WildAccusation;
|
||||||
|
|
||||||
|
impl EventHandle for WildAccusation {
|
||||||
|
fn handle<'main>(
|
||||||
|
self: &Self,
|
||||||
|
rng: &'main ThreadRng,
|
||||||
|
player: &'main mut Character,
|
||||||
|
characters: &'main mut Vec<People>
|
||||||
|
) -> EventReturn {
|
||||||
|
EventReturn::None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum Events {
|
||||||
|
Trial(Trial)
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Distribution<Events> for Standard {
|
||||||
|
fn sample<R: rand::Rng + ?Sized>(&self, rng: &mut R) -> Events {
|
||||||
|
match rng.gen_range(0..=0) {
|
||||||
|
0 => Events::Trial(Trial),
|
||||||
|
1 => Events::Trial(Trial),
|
||||||
|
_ => unreachable!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum EventReturn {
|
||||||
|
Survival(SurvivalStatus),
|
||||||
|
None
|
||||||
|
}
|
||||||
161
src/main.rs
161
src/main.rs
@@ -5,11 +5,15 @@ mod utils;
|
|||||||
use characters::{
|
use characters::{
|
||||||
Character,
|
Character,
|
||||||
People,
|
People,
|
||||||
Standing,
|
|
||||||
SurvivalStatus
|
SurvivalStatus
|
||||||
};
|
};
|
||||||
use events::get_event;
|
use events::{
|
||||||
use std::vec;
|
get_event, EventHandle, EventReturn, Events, Trial
|
||||||
|
};
|
||||||
|
use rand::{
|
||||||
|
random,
|
||||||
|
thread_rng
|
||||||
|
};
|
||||||
use utils::{
|
use utils::{
|
||||||
fmt_args,
|
fmt_args,
|
||||||
ArgType,
|
ArgType,
|
||||||
@@ -21,30 +25,61 @@ const ROUNDS: u8 = 15;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let cmd_args = dbg!(fmt_args());
|
let cmd_args = dbg!(fmt_args());
|
||||||
let mut characters = build_characters();
|
let mut characters = People::build_characters();
|
||||||
|
let mut rng = thread_rng();
|
||||||
|
|
||||||
// Set player default values based on gamemode.
|
// Set player default values based on gamemode.
|
||||||
let mut player = dbg!(build_player(dbg!(get_gamemode(cmd_args))));
|
let mut player: Character = dbg!(Character::build_player(Gamemode::get(&cmd_args)));
|
||||||
let end_status = SurvivalStatus::PlayerLived;
|
let mut end_status = SurvivalStatus::PlayerLived;
|
||||||
|
|
||||||
for _r in 0..=ROUNDS {
|
// Game loop.
|
||||||
get_event().handle(player);
|
for r in 0..=ROUNDS {
|
||||||
|
let random_event: Events = random();
|
||||||
|
|
||||||
if player.standing.calculate() <= 0 {
|
match random_event {
|
||||||
let mut trial = events::Trial;
|
Events::Trial(trial) => match trial.handle(&rng, &mut player, &mut characters) {
|
||||||
|
EventReturn::Survival(state) => match state {
|
||||||
|
SurvivalStatus::PlayerLived => (),
|
||||||
|
_ => {end_status = state}
|
||||||
|
}
|
||||||
|
_ => unreachable!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
match trial.handle(&mut player) {
|
match end_status {
|
||||||
SurvivalStatus::PlayerDied => {
|
SurvivalStatus::PlayerLived => (),
|
||||||
end_status = SurvivalStatus::PlayerDied
|
_ => break
|
||||||
|
}
|
||||||
|
|
||||||
|
// If player's standing is too low, bring to court.
|
||||||
|
if player.standing.clone().calculate() <= 0 {
|
||||||
|
match Trial.handle(&rng, &mut player, &mut characters) {
|
||||||
|
EventReturn::Survival(state) => match state {
|
||||||
|
SurvivalStatus::PlayerLived => (),
|
||||||
|
_ => {end_status = state}
|
||||||
},
|
},
|
||||||
_ => ()
|
_ => unreachable!()
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if r == ROUNDS {
|
||||||
|
end_status = SurvivalStatus::PlayerLived
|
||||||
|
};
|
||||||
|
|
||||||
|
if characters.len() == 0 {
|
||||||
|
end_status = SurvivalStatus::PlayerMassacred
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
match end_status {
|
||||||
|
SurvivalStatus::PlayerDied => println!("You died. And for what?"),
|
||||||
|
SurvivalStatus::PlayerLived => println!("You survived, but at what cost? How many died to save you?"),
|
||||||
|
SurvivalStatus::PlayerMassacred => println!("You killed everyone. I ask, at what end will you yield. Care you not for the life of others?")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum Gamemode {
|
pub enum Gamemode {
|
||||||
//Easy
|
//Easy
|
||||||
Abigail,
|
Abigail,
|
||||||
//Normal
|
//Normal
|
||||||
@@ -55,95 +90,8 @@ enum Gamemode {
|
|||||||
GoodyOsborne
|
GoodyOsborne
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_characters() -> Vec<People> {
|
impl Gamemode {
|
||||||
vec![
|
fn get(cmd_args: &Vec<ArgType>) -> Gamemode {
|
||||||
People::AbigailWilliams(Some(Character {
|
|
||||||
name: "Abigail Williams",
|
|
||||||
standing: Standing {
|
|
||||||
society: 10,
|
|
||||||
court: 10,
|
|
||||||
friends: vec![
|
|
||||||
&People::BettyParris(None),
|
|
||||||
&People::DeputyGovernorDanforth(None),
|
|
||||||
&People::ReverendParris(None),
|
|
||||||
],
|
|
||||||
enemies: vec![
|
|
||||||
&People::ElizabethProctor(None),
|
|
||||||
&People::JohnProctor(None),
|
|
||||||
&People::ReverendJohnHale(None)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})),
|
|
||||||
People::BettyParris(Some(Character {
|
|
||||||
name: "Betty Parris",
|
|
||||||
standing: Standing {
|
|
||||||
society: 10,
|
|
||||||
court: 10,
|
|
||||||
friends: vec![
|
|
||||||
&People::AbigailWilliams(None),
|
|
||||||
&People::ReverendParris(None)
|
|
||||||
],
|
|
||||||
enemies: vec![
|
|
||||||
&People::JohnProctor(None),
|
|
||||||
&People::ElizabethProctor(None)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})),
|
|
||||||
People::ElizabethProctor(Some(Character{
|
|
||||||
name: "Elizabeth Proctor",
|
|
||||||
standing: Standing {
|
|
||||||
society: 10,
|
|
||||||
court: 5,
|
|
||||||
friends: vec![
|
|
||||||
&People::FrancisNurse(None),
|
|
||||||
&People::GilesCorey(None),
|
|
||||||
&People::JohnProctor(None),
|
|
||||||
&People::RebeccaNurse(None),
|
|
||||||
&People::ReverendJohnHale(None)
|
|
||||||
],
|
|
||||||
enemies: vec![
|
|
||||||
&People::AbigailWilliams(None),
|
|
||||||
&People::DeputyGovernorDanforth(None),
|
|
||||||
&People::EzekielCheever(None)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
fn build_player(gamemode: Gamemode) -> Character {
|
|
||||||
Character {
|
|
||||||
name: "You",
|
|
||||||
standing: match gamemode {
|
|
||||||
Gamemode::Abigail => Standing {
|
|
||||||
society: 10,
|
|
||||||
court: 10,
|
|
||||||
friends: vec![],
|
|
||||||
enemies: vec![]
|
|
||||||
},
|
|
||||||
Gamemode::MaryWarren => Standing {
|
|
||||||
society: 5,
|
|
||||||
court: 5,
|
|
||||||
friends: vec![],
|
|
||||||
enemies: vec![]
|
|
||||||
},
|
|
||||||
Gamemode::JohnProctor => Standing {
|
|
||||||
society: 2,
|
|
||||||
court: 2,
|
|
||||||
friends: vec![],
|
|
||||||
enemies: vec![]
|
|
||||||
},
|
|
||||||
Gamemode::GoodyOsborne => Standing {
|
|
||||||
society: -15,
|
|
||||||
court: -5,
|
|
||||||
friends: vec![],
|
|
||||||
enemies: vec![]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn get_gamemode(cmd_args: Vec<ArgType>) -> Gamemode {
|
|
||||||
if cmd_args.len() != 1 {
|
if cmd_args.len() != 1 {
|
||||||
match &cmd_args[1] {
|
match &cmd_args[1] {
|
||||||
ArgType::Command(c) => match c.as_str() {
|
ArgType::Command(c) => match c.as_str() {
|
||||||
@@ -171,4 +119,5 @@ fn get_gamemode(cmd_args: Vec<ArgType>) -> Gamemode {
|
|||||||
} else {
|
} else {
|
||||||
Gamemode::MaryWarren
|
Gamemode::MaryWarren
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user