diff --git a/Game/AI/Executor.cs b/Game/AI/Executor.cs index 224e5965..12265319 100644 --- a/Game/AI/Executor.cs +++ b/Game/AI/Executor.cs @@ -104,6 +104,11 @@ public virtual void OnDraw(int player) // Some AI need do something on draw } + public virtual void OnMove() + { + // Some AI need do something on Move + } + public virtual IList OnSelectCard(IList cards, int min, int max, int hint, bool cancelable) { // For overriding diff --git a/Game/GameAI.cs b/Game/GameAI.cs index f51f1b45..ca315fe4 100644 --- a/Game/GameAI.cs +++ b/Game/GameAI.cs @@ -78,6 +78,14 @@ public void OnDraw(int player) Executor.OnDraw(player); } + /// + /// Called when move a card + /// + public void OnMove() + { + Executor.OnMove(); + } + /// /// Called when it's a new turn. /// diff --git a/Game/GameBehavior.cs b/Game/GameBehavior.cs index 1f69adb3..deecc868 100644 --- a/Game/GameBehavior.cs +++ b/Game/GameBehavior.cs @@ -575,6 +575,7 @@ private void OnMove(BinaryReader packet) (CardLocation)previousLocation + " move to " + (CardLocation)currentLocation + ")"); } } + _ai.OnMove(); } private void OnSwap(BinaryReader packet)