Commit 35a73da9 authored by mercury233's avatar mercury233

add Executor.OnDraw

parent 5f585012
......@@ -97,6 +97,11 @@ namespace WindBot.Game.AI
{
// Some AI need do something on new turn
}
public virtual void OnDraw(int player)
{
// Some AI need do something on draw
}
public virtual IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
......
......@@ -70,6 +70,14 @@ namespace WindBot.Game
return Executor.OnSelectHand();
}
/// <summary>
/// Called when any player draw card.
/// </summary>
public void OnDraw(int player)
{
Executor.OnDraw(player);
}
/// <summary>
/// Called when it's a new turn.
/// </summary>
......
......@@ -360,6 +360,7 @@ namespace WindBot.Game
_duel.Fields[player].Deck.RemoveAt(_duel.Fields[player].Deck.Count - 1);
_duel.Fields[player].Hand.Add(new ClientCard(0, CardLocation.Hand));
}
_ai.OnDraw(player);
}
private void OnShuffleDeck(BinaryReader packet)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment