FFI for Pokemon Party, make Pokemon Party use interior mutability.

This commit is contained in:
2022-10-15 11:16:41 +02:00
parent c7b5bb7d12
commit 554a665b8f
5 changed files with 120 additions and 26 deletions

View File

@@ -34,9 +34,7 @@ impl TestStep {
pub fn execute(&self, battle: &mut Battle) {
match self {
TestStep::SetPokemon { place, from_party } => {
let p = battle.parties()[from_party[0] as usize]
.get_pokemon(from_party[1] as usize)
.clone();
let p = battle.parties()[from_party[0] as usize].get_pokemon(from_party[1] as usize);
battle.sides_mut()[place[0] as usize].set_pokemon(place[1], p);
}
TestStep::SetMoveChoice {