Ejemplo n.º 1
0
 def test_late_raiser(self):
     for p in self.players:
         if p.seat < 9:
             self.__set_bet(p, 2, 0)
         # seat 9 raises:
     self.__set_bet(self.players[9], 4, 1)
     self.assertEquals(self.players[0],
                       find_next_to_act(self.players, 9, 1))
Ejemplo n.º 2
0
    def test_everybody_in_or_folded(self):
        for p in self.players:
            if p.seat < 5:
                self.__set_bet(p, 2, 0)
            else:
                p.folded = True

        self.assertEquals(None, find_next_to_act(self.players, 4, 0))
Ejemplo n.º 3
0
    def test_middle_table(self):
        self.__set_bet(self.players[1], 1, -1)
        self.__set_bet(self.players[2], 2, -1)
        self.__set_bet(self.players[3], 2, 0)
        self.__set_bet(self.players[4], 2, 0)

        self.assertEquals(self.players[5],
                          find_next_to_act(self.players, 4, 0))
Ejemplo n.º 4
0
    def test_after_blinds(self):
        # Blinds bet in round 0
        self.__set_bet(self.players[1], 1, -1)
        self.__set_bet(self.players[2], 2, -1)

        self.assertEquals(self.players[3], find_next_to_act(self.players,
                                                            2,
                                                            0))
Ejemplo n.º 5
0
    def test_everybody_in(self):
        for p in self.players:
            self.__set_bet(p, 2, 0)

        self.assertEquals(None, find_next_to_act(self.players, 9, 0))
Ejemplo n.º 6
0
    def test_wraparound(self):
        self.__set_bet(self.players[9], 2, 0)

        self.assertEquals(self.players[0],
                          find_next_to_act(self.players, 9, 0))