コード例 #1
0
ファイル: PowerRating.cs プロジェクト: mcmhav/PokerAI
 public int betterThan(PowerRating other)
 {
     if (this.first != other.first) return this.first > other.first ? 1 : -1;
     else if (this.second != other.second) return this.second > other.second ? 1 : -1;
     else if (this.third != other.third) return this.third > other.third ? 1 : -1;
     else if (this.fourth != other.fourth) return this.fourth > other.fourth ? 1 : -1;
     else if (this.fift != other.fift) return this.fift > other.fift ? 1 : -1;
     else if (this.sixth != other.sixth) return this.sixth > other.sixth ? 1 : -1;
     else return 0;
 }
コード例 #2
0
ファイル: Player.cs プロジェクト: mcmhav/PokerAI
 public void updatePowerRating()
 {
     List<Card> temp = new List<Card>();
     temp.AddRange(Hand);
     temp.AddRange(Table.getCommunityCards());
     PowerRating = new PowerRating(temp);
 }