def effectiveBB(self, stack, players): """ Returns how many big blinds are effectively in the stack. First adds up the current pot which is (SB + BB + Antes). The players variable is an integer which specified how many antes to add. Then the effective big blind is 2/3rds of the pot. Returns a rounded integer. """ return numtools.round_number(stack / self.trueBB(players))
def test_roundnumber_1_returns1(self): num = 1 expected = 1 result = numtools.round_number(num) self.assertEqual(expected, result)
def big_blinds(self, stack): """ Returns how many big blinds are in the stack. Uses the Big Blind from the current level and rounds down. """ return numtools.round_number(stack / self.BB)
def test_roundnumber_10pt4_returns10(self): num = 10.4 expected = 10 result = numtools.round_number(num) self.assertEqual(expected, result)