FFI for Pokemon Party, make Pokemon Party use interior mutability.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user