Commit 1007700b authored by mercury233's avatar mercury233

add Utils.GetMatchingCards

parent 1b440dc3
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using YGOSharp.OCGWrapper.Enums;
namespace WindBot.Game.AI
......@@ -244,6 +245,11 @@ namespace WindBot.Game.AI
return null;
}
public IList<ClientCard> GetMatchingCards(IList<ClientCard> cards, Func<ClientCard, bool> filter)
{
return cards.Where(card => card != null && filter(card)).ToList();
}
public ClientCard GetPZone(int player, int id)
{
if (Duel.IsNewRule)
......
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