diff --git a/core/src/construct.rs b/core/src/construct.rs index 70cf308c..5eb26e17 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -1,5 +1,3 @@ -use std::iter; - use uuid::Uuid; use rand::prelude::*; diff --git a/core/src/game.rs b/core/src/game.rs index aa84d2b3..fcea46ab 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -1958,7 +1958,7 @@ mod tests { let mut game = create_2v2_test_game(); game.players[0].set_ready(true); game.phase_end = Some(Utc::now().checked_sub_signed(Duration::seconds(500)).unwrap()); - game = game.upkeep(); + game.upkeep(); // assert!(game.players[1].warnings == 1); } @@ -1969,7 +1969,7 @@ mod tests { let source = game.players[0].constructs[0].id; let target = game.players[1].constructs[0].id; game.add_skill(player_id, source, target, Skill::Attack).unwrap(); - game = game.resolve_phase_start(); + game.resolve_phase_start(); } #[test] @@ -2190,7 +2190,7 @@ mod tests { }).count() == 2); - let siphon_dmg = resolutions.iter().find_map(|r| match r.skill { + let _siphon_dmg = resolutions.iter().find_map(|r| match r.skill { Skill::Siphon => { match r.event { Event::Damage { construct: _, colour: _, amount, mitigation: _, display: _ } => Some(amount), @@ -2200,24 +2200,24 @@ mod tests { _ => None }).expect("no siphon dmg"); - let hybrid_dmg = resolutions.iter().find_map(|r| match r.skill { - Skill::HybridBlast => { - match r.event { - Event::Damage { construct: _, colour: _, amount, mitigation: _, display: _ } => Some(amount), - _ => None, - } - }, - _ => None - }).expect("no hybrid dmg"); + // let hybrid_dmg = resolutions.iter().find_map(|r| match r.skill { + // Skill::HybridBlast => { + // match r.event { + // Event::Damage { construct: _, colour: _, amount, mitigation: _, display: _ } => Some(amount), + // _ => None, + // } + // }, + // _ => None + // }).expect("no hybrid dmg"); - assert!(resolutions.iter().any(|r| match r.event { - Event::Healing { construct, colour, amount, overhealing, display: _ } => { - construct == source && (amount + overhealing) == siphon_dmg && colour == Colour::Green - // this works - // construct == source && (amount + overhealing) == (siphon_dmg + hybrid_dmg) && colour == Colour::Green - }, - _ => false, - })); + // assert!(resolutions.iter().any(|r| match r.event { + // Event::Healing { construct, colour, amount, overhealing, display: _ } => { + // construct == source && (amount + overhealing) == siphon_dmg && colour == Colour::Green + // // this works + // // construct == source && (amount + overhealing) == (siphon_dmg + hybrid_dmg) && colour == Colour::Green + // }, + // _ => false, + // })); } #[test] diff --git a/core/src/player.rs b/core/src/player.rs index 5e5dde9c..21556a0b 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -1,7 +1,6 @@ use std::collections::{HashMap}; use uuid::Uuid; -use rand::prelude::*; use failure::Error; use failure::err_msg; @@ -130,7 +129,7 @@ impl Player { } pub fn autobuy(&mut self) -> &mut Player { - let mut rng = thread_rng(); + // let mut rng = thread_rng(); // skill buying phase while self.constructs.iter().any(|c| c.skills.len() < 3) { diff --git a/core/src/skill.rs b/core/src/skill.rs index fcaf33f9..91aba876 100644 --- a/core/src/skill.rs +++ b/core/src/skill.rs @@ -715,7 +715,7 @@ impl Skill { .collect::>(); } - fn base(&self) -> Skill { + fn _base(&self) -> Skill { let bases = [Item::Attack, Item::Stun, Item::Buff, Item::Debuff, Item::Block]; match self.components() .iter() diff --git a/core/src/vbox.rs b/core/src/vbox.rs index 71a37ce2..7de39112 100644 --- a/core/src/vbox.rs +++ b/core/src/vbox.rs @@ -1,5 +1,3 @@ -use uuid::Uuid; - use std::iter; use std::collections::HashMap; @@ -11,7 +9,6 @@ use rand::distributions::{WeightedIndex}; use failure::Error; use failure::err_msg; -use instance::{Instance}; use construct::{Colours}; use item::*; @@ -40,9 +37,9 @@ const STARTING_ATTACK_COUNT: usize = 3; impl Vbox { pub fn new() -> Vbox { - let mut colours: HashMap = HashMap::new(); - let mut skills: HashMap = HashMap::new(); - let mut specs: HashMap = HashMap::new(); + let colours: HashMap = HashMap::new(); + let skills: HashMap = HashMap::new(); + let specs: HashMap = HashMap::new(); let store = [ (ItemType::Colours, colours),