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

@@ -45,7 +45,7 @@ impl BattleParty {
}
/// Gets a Pokemon at an index.
pub fn get_pokemon(&self, index: usize) -> &Option<Arc<Pokemon>> {
pub fn get_pokemon(&self, index: usize) -> Option<Arc<Pokemon>> {
self.party.at(index)
}