using System; using PkmnLibSharp.Battling; using PkmnLibSharp.Utilities; using BaseTurnChoice = PkmnLibSharp.Battling.ChoiceTurn.BaseTurnChoice; namespace PkmnLibSharp.AI { public abstract class PokemonAI : PointerWrapper { protected PokemonAI(IntPtr ptr) : base(ptr) { } public BaseTurnChoice GetChoice(Battle battle, Pokemon user) { var ptr = IntPtr.Zero; PkmnLibAI.Generated.PokemonAI.GetChoice(ref ptr, Ptr, battle.Ptr, user.Ptr).Assert(); return BaseTurnChoice.GetFromPointer(ptr); } protected override void DeletePtr() { PkmnLibAI.Generated.PokemonAI.Delete(Ptr); } } }