예제 #1
0
파일: test_hand.py 프로젝트: zxpower/poker
def test_suited_hand_to_combos():
    assert Hand("76s").to_combos() == (
        Combo("7c6c"),
        Combo("7d6d"),
        Combo("7h6h"),
        Combo("7s6s"),
    )
예제 #2
0
파일: test_hand.py 프로젝트: zxpower/poker
def test_pair_hand_to_combos():
    assert Hand("22").to_combos() == (
        Combo("2c2d"),
        Combo("2c2h"),
        Combo("2c2s"),
        Combo("2d2h"),
        Combo("2d2s"),
        Combo("2h2s"),
    )
예제 #3
0
파일: test_hand.py 프로젝트: zxpower/poker
def test_offsuit_hand_to_combos():
    assert Hand("76o").to_combos() == (
        Combo("7c6d"),
        Combo("7c6h"),
        Combo("7c6s"),
        Combo("7d6c"),
        Combo("7d6h"),
        Combo("7d6s"),
        Combo("7h6c"),
        Combo("7h6d"),
        Combo("7h6s"),
        Combo("7s6c"),
        Combo("7s6d"),
        Combo("7s6h"),
    )
예제 #4
0
def test_suited_hand_to_combos():
    assert Hand('76s').to_combos() == (Combo('7c6c'), Combo('7d6d'), Combo('7h6h'), Combo('7s6s'))
예제 #5
0
def test_offsuit_hand_to_combos():
    assert Hand('76o').to_combos() == (
        Combo('7c6d'), Combo('7c6h'), Combo('7c6s'), Combo('7d6c'), Combo('7d6h'), Combo('7d6s'),
        Combo('7h6c'), Combo('7h6d'), Combo('7h6s'), Combo('7s6c'), Combo('7s6d'), Combo('7s6h')
    )
예제 #6
0
def test_pair_hand_to_combos():
    assert Hand('22').to_combos() == (
        Combo('2c2d'), Combo('2c2h'), Combo('2c2s'), Combo('2d2h'), Combo('2d2s'), Combo('2h2s')
    )
예제 #7
0
 def generate_player_hands(self, deck: List[Combo]):
     return [Combo.from_cards(deck.pop(), deck.pop()) for _ in range(len(self.remaining_players))]
예제 #8
0
async def combo(ctx, arg):
    print(arg)
    await ctx.send(Combo(arg))