Make PokemonParty an IReadOnlyList instead of IEnumerable
This commit is contained in:
parent
4ce0aa54ea
commit
e3f8e7e71c
|
@ -6,7 +6,7 @@ using PkmnLibSharp.Utilities;
|
|||
|
||||
namespace PkmnLibSharp.Battling
|
||||
{
|
||||
public class PokemonParty : PointerWrapper, IEnumerable<Pokemon?>
|
||||
public class PokemonParty : PointerWrapper, IReadOnlyList<Pokemon?>
|
||||
{
|
||||
public delegate void OnSwitchDelegate(ulong a, ulong b);
|
||||
public event OnSwitchDelegate? OnSwitch;
|
||||
|
@ -114,8 +114,11 @@ namespace PkmnLibSharp.Battling
|
|||
|
||||
_cache = null;
|
||||
}
|
||||
public int Count => (int)Length;
|
||||
|
||||
|
||||
|
||||
public int IndexOf(Pokemon? pokemon)
|
||||
{
|
||||
return Party.IndexOf(pokemon);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue