horned bear
parent
f0c556833c
commit
920fd89716
@ -0,0 +1,78 @@
|
|||||||
|
use kartsimrust::{
|
||||||
|
premade::{get_bob, get_george, get_horned_bear},
|
||||||
|
test_util::battle_stats::battle_stats,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
env_logger::init();
|
||||||
|
|
||||||
|
let mut characters = vec![get_bob()];
|
||||||
|
let mut enemies = (0..1).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob won {:.2}% of battles in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_george()];
|
||||||
|
enemies = (0..1).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"George won {:.2}% of battles in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_bob()];
|
||||||
|
enemies = (0..2).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob won {:.2}% of battles against 2 Horned Bears in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_bob(), get_george()];
|
||||||
|
enemies = (0..1).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob and George won {:.2}% of battles against 1 Horned Bear in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_bob(), get_george(), get_bob()];
|
||||||
|
enemies = (0..1).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob and George and Bob won {:.2}% of battles against 1 Horned Bear in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_bob(), get_george(), get_bob()];
|
||||||
|
enemies = (0..2).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob and George won {:.2}% of battles against 2 Horned Bears in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
);
|
||||||
|
|
||||||
|
characters = vec![get_bob(), get_george(), get_bob()];
|
||||||
|
enemies = (0..3).map(|_| get_horned_bear()).collect::<Vec<_>>();
|
||||||
|
|
||||||
|
let (p, mu_t) = battle_stats(characters, enemies);
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Bob and George won {:.2}% of battles against 3 Horned Bears in an average of {:.1} turns.",
|
||||||
|
p, mu_t
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue