// Pre-flop public char preFlopBasedInGMGroups(AdvancedClientPokerDynamics dynamics) { HoldemSMGroup gSM1 = new HoldemSMGroup("SM1"); HoldemSMGroup gSM2 = new HoldemSMGroup("SM2"); HoldemSMGroup gSM3 = new HoldemSMGroup("SM3"); HoldemSMGroup gSM4 = new HoldemSMGroup("SM4"); HoldemSMGroup gSM5 = new HoldemSMGroup("SM5"); HoldemSMGroup gSM6 = new HoldemSMGroup("SM6"); HoldemSMGroup gSM7 = new HoldemSMGroup("SM7"); HoldemSMGroup gSM8 = new HoldemSMGroup("SM8"); HoldemSMGroup gSM9 = new HoldemSMGroup("SM9"); long longCards = Deck.parseCardMask( "" + dynamics.hole[dynamics.seatTaken][0] + dynamics.hole[dynamics.seatTaken][1]); if (gSM9.isHandInGroup(longCards)) return 'f'; else if (gSM1.isHandInGroup(longCards) || gSM2.isHandInGroup(longCards) || gSM3.isHandInGroup(longCards) || gSM4.isHandInGroup(longCards)) return 'r'; else if (gSM5.isHandInGroup(longCards) || gSM6.isHandInGroup(longCards) || gSM7.isHandInGroup(longCards) || gSM8.isHandInGroup(longCards)) return 'c'; return 'f'; }
public void testParseCardMask() { long mask = Deck.parseCardMask("As Ah 2h"); long expected = maskAs | maskAh | mask2h; assertEquals(expected, mask); }