本文整理汇总了C#中SevenWondersGUI.PlayerState.countCardType方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerState.countCardType方法的具体用法?C# PlayerState.countCardType怎么用?C# PlayerState.countCardType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SevenWondersGUI.PlayerState
的用法示例。
在下文中一共展示了PlayerState.countCardType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GuildScore
private int GuildScore(PlayerState p, GameState g)
{
int score = 0;
List<GuildCard> glist = new List<GuildCard>();
//GameState g = ;
//Cycle through played cards
for (int i = 0; i < p.getPlayedCards().Count; i++)
{
if (p.getPlayedCards()[i].getType() == Card._GUILD)
{
glist.Add((GuildCard)p.getPlayedCards()[i]);
}
}
//Cycle through guild cards
for (int i = 0; i < glist.Count; i++)
{
//worker
if (glist[i].getNumber() == 98) { score = score + (2 * (g.getLeftPlayer(p).countCardType(2) + g.getRightPlayer(p).countCardType(2)));}
//craft
if (glist[i].getNumber() == 99) { score = score + (g.getLeftPlayer(p).countCardType(1) + g.getRightPlayer(p).countCardType(1)); }
//trader
if (glist[i].getNumber() == 100) { score = score + (g.getLeftPlayer(p).countCardType(4) + g.getRightPlayer(p).countCardType(4)); }
//Philospher
if (glist[i].getNumber() == 101) { score = score + (g.getLeftPlayer(p).countCardType(6) + g.getRightPlayer(p).countCardType(6)); }
//Spies
if (glist[i].getNumber() == 102) { score = score + (g.getLeftPlayer(p).countCardType(5) + g.getRightPlayer(p).countCardType(5)); }
//strat
if (glist[i].getNumber() == 103) { score = score + (g.getLeftPlayer(p).getNumLosses()) + (g.getRightPlayer(p).getNumLosses());}
//ship
if (glist[i].getNumber() == 104) { score = score + (p.countCardType(1)) + (p.countCardType(2)) + (p.countCardType(7));}
//Science
if (glist[i].getNumber() == 105) { scienceguildCard = true; }
//magistrat
if (glist[i].getNumber() == 106) { score = score + (g.getLeftPlayer(p).countCardType(3) + g.getRightPlayer(p).countCardType(3)); }
//builders
if (glist[i].getNumber() == 107) {
score = score + (g.getRightPlayer(p).getBoard().getCurrentWonderLevel());
score = score + (g.getLeftPlayer(p).getBoard().getCurrentWonderLevel());
score = score + (p.getBoard().getCurrentWonderLevel());
}
}
return score;
}