A bunch more work on replacing every potential panic with results
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-16 19:57:21 +02:00
parent 1b8403ecda
commit 00d596d656
37 changed files with 526 additions and 300 deletions

View File

@@ -56,7 +56,7 @@ impl TestCase {
}
let mut battle_parties = Vec::new();
for party in parties {
battle_parties.push(BattleParty::new(party.0.clone(), party.1));
battle_parties.push(BattleParty::new(party.0.clone(), party.1).unwrap());
}
let mut battle = Battle::new(
library,

View File

@@ -99,11 +99,13 @@ fn validate_assurance() {
let party1 = BattleParty::new(
Arc::new(PokemonParty::new_from_vec(vec![Some(p1.clone())])),
vec![(0, 0)],
);
)
.unwrap();
let party2 = BattleParty::new(
Arc::new(PokemonParty::new_from_vec(vec![Some(p2.clone())])),
vec![(1, 0)],
);
)
.unwrap();
let battle = Battle::new(lib.clone(), vec![party1, party2], false, 2, 1, None);