本文整理匯總了C#中Board.GetPlayables方法的典型用法代碼示例。如果您正苦於以下問題:C# Board.GetPlayables方法的具體用法?C# Board.GetPlayables怎麽用?C# Board.GetPlayables使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Board
的用法示例。
在下文中一共展示了Board.GetPlayables方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ShouldBePlayed
public override bool ShouldBePlayed(Board board)
{
foreach(Card c in board.Hand)
{
if(c.CurrentCost == 4 && c.Type == Card.CType.MINION)
if(board.TurnCount < 2 && !board.HasCardInHand("GAME_005") && board.ManaAvailable == 1)
return false;
}
int dropThreePlayale = board.GetPlayables(Card.CType.MINION, 3,3).Count;
if(!board.HasCardInHand("GAME_005") && dropThreePlayale < 1 && board.TurnCount < 2 && board.ManaAvailable == 1)
return false;
return true;
}
示例2: ShouldBePlayed
public override bool ShouldBePlayed(Board board)
{
if(board.EnemyClass == Board.Class.ROGUE || board.EnemyClass == Board.Class.MAGE || board.EnemyClass == Board.Class.DRUID)
{
List<Card> playable = board.GetPlayables(Card.CType.MINION, 2,2);
int drop1Playable = board.GetPlayables(Card.CType.MINION, 1,1).Count;
bool has2Hp = false;
foreach(Card c in playable)
{
if(c.CurrentHealth >= 2)
has2Hp = true;
}
if(!has2Hp && drop1Playable < 2 && board.ManaAvailable == 1 && !board.HasCardInHand("EX1_169"))
return false;
}
if(board.TurnCount > 3)
return true;
if(board.GetPlayables(Card.CType.SPELL, 2,2).Count > 0 && board.TurnCount == 1)
return true;
if(board.MinionEnemy.Count > 0 && board.GetPlayables(Card.CType.MINION, 2,2).Count > 0 && board.TurnCount == 1)
return true;
if(board.GetPlayables(Card.CType.MINION, 2,2).Count < 2 && board.TurnCount == 1 && board.GetPlayables(Card.CType.MINION, 1,1).Count == 0 && !(board.HasCardInHand("EX1_169") && board.GetPlayables(Card.CType.MINION, 2,4).Count > 0))
return false;
foreach(Card c in board.Hand)
{
if (c.CurrentCost == board.ManaAvailable + 1)
return true;
}
return true;
}
示例3: GetCoinValue
public int GetCoinValue(Board board)
{
int currentMana = board.MaxMana;
bool HasDropCurrentTurn = (board.GetPlayables(currentMana, currentMana).Count != 0);
bool HasDropNextTurn = (board.GetPlayables(currentMana + 1, currentMana + 1).Count != 0);
if (HasDropCurrentTurn)
{
if(board.MaxMana == 1 && board.GetPlayables(1, 1).Count == 2)
return 0;
return 8;
}
if (!HasDropCurrentTurn && HasDropNextTurn)
{
bool CanPlayOnCurve = ((board.GetPlayables(currentMana + 1, currentMana + 1).Count > 1) && (board.GetPlayables(currentMana + 2, currentMana + 2).Count >= 1));
if (CanPlayOnCurve)
{
return 0;
}
return 8;
}
return 5;
}