Exemplo n.º 1
0
    def test_besthandval_6players_straight(self):
        # Note hand values reversed so that 0 has the lowest hand, 1 has better,  etc.
        self.setup_allins(6)
        tools.deal_ranked_hands(self.t, _rev=True)
        players = self.t.get_players(hascards=True)

        expected = evaluator.get_value(tools.make('straight_high'))
        result = pots.best_hand_val(players)
        self.assertEqual(expected, result)
Exemplo n.º 2
0
    def test_processsidepots_2players(self):
        """ 2 players, 2 allins. """
        self.setup_allins(2)
        tools.deal_ranked_hands(self.t)
        self.everybody_bet(200)
        sidepots = self.p.make_sidepots()

        expected = {200: [0], 100: [1]}
        result = self.p.process_sidepots(sidepots)
        self.assertEqual(expected, result)
Exemplo n.º 3
0
    def test_processsidepots_3players(self):
        """ 3 players, 3 allins. """
        self.setup_allins(3)
        tools.deal_ranked_hands(self.t)
        self.everybody_bet(300)
        # seat 0 gets strongest hand, 1 gets middle, 2 gets lowest.
        sidepots = self.p.make_sidepots()

        expected = {300: [0], 200: [1], 100: [2]}
        result = self.p.process_sidepots(sidepots)
        self.assertEqual(expected, result)