def __init__(self, config, parent, debug=True): """Constructor for GuiStove""" self.stove = Stove.Stove() self.ev = None self.boardtext = "" self.herorange = "" self.villainrange = "" self.conf = config self.parent = parent self.mainHBox = gtk.HBox(False, 0) # hierarchy: self.mainHBox / self.notebook self.notebook = gtk.Notebook() self.notebook.set_tab_pos(gtk.POS_TOP) self.notebook.set_show_tabs(True) self.notebook.set_show_border(True) self.createFlopTab() self.createStudTab() self.createDrawTab() self.mainHBox.add(self.notebook) self.mainHBox.show_all() if DEBUG == False: warning_string = _("Stove is a GUI mockup of a EV calculation page, and completely non functional.\n") warning_string += _("Unless you are interested in developing this feature, please ignore this page.\n") warning_string += _("If you are interested in developing the code further see GuiStove.py and Stove.py\n") warning_string += _("Thank you") self.warning_box(warning_string)
def update_flop_output_pane(self, caller, widget): print(_("DEBUG:") + " " + _("called") + " update_flop_output_pane") self.stove.set_board_string(self.boardtext) self.stove.set_hero_cards_string(self.herorange) self.stove.set_villain_range_string(self.villainrange) print(_("DEBUG:") + ("odds_for_range")) self.ev = Stove.odds_for_range(self.stove) print(_("DEBUG:") + " " + ("set_output_label")) self.set_output_label(self.ev.output)