Example #1
0
 def _create_afe(self):
     """
     Create the AnalysisFoldEquity
     """
     afe = AnalysisFoldEquity()
     afe.gameid = self.gameid
     afe.order = self.order
     afe.street = self.street
     afe.pot_before_bet = self.pot_before_bet
     afe.is_raise = self.range_action.is_raise
     afe.is_check = self.range_action.is_check
     afe.bet_cost = self.bet_cost
     afe.raise_total = self.raise_total
     afe.pot_if_called = self.pot_if_called
     return afe
Example #2
0
 def _create_afe(self):
     """
     Create the AnalysisFoldEquity
     """
     afe = AnalysisFoldEquity()
     afe.gameid = self.gameid
     afe.order = self.order
     afe.street = self.street
     afe.pot_before_bet = self.pot_before_bet
     afe.is_raise = self.range_action.is_raise
     afe.is_check = self.range_action.is_check
     afe.bet_cost = self.bet_cost
     afe.raise_total = self.raise_total
     afe.pot_if_called = self.pot_if_called
     return afe
Example #3
0
def write_analysis_fold_equities(session, afes):
    """ Write AnalysisFoldEquity table from memory into DB """
    for gameid, order, street, pot_before_bet, is_raise, is_check, bet_cost,  \
            raise_total, pot_if_called in afes:
        afe = AnalysisFoldEquity()
        session.add(afe)
        afe.gameid = gameid
        afe.order = order
        afe.street = street
        afe.pot_before_bet = pot_before_bet
        afe.is_raise = is_raise
        afe.is_check = is_check
        afe.bet_cost = bet_cost
        afe.raise_total = raise_total
        afe.pot_if_called = pot_if_called