Make PokemonParty an IReadOnlyList instead of IEnumerable
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user