def quit(self): self.stopped = True self.quitting = True engine.movenow() self.save_settings() gv.usib.stop_engine() gv.usiw.stop_engine() Gtk.main_quit() return False
def stop(self): self.stopped = True gv.gui.enable_menu_items() gv.gui.enable_go_button() gv.gui.disable_stop_button() gv.gui.unset_all_drag_and_drop_squares() # update time gv.tc.stop_clock() # stop engines gv.usib.stop_engine() gv.usiw.stop_engine() engine.movenow() gv.gui.set_status_bar_msg(_("stopped"))
def move_now(self, b): if self.player[self.stm] == "Human": return if not self.thinking: return # builtin gshogi engine if self.player[self.stm] == "gshogi": engine.movenow() return # USI engine try: if self.stm == BLACK: gv.usib.command("stop\n") else: gv.usiw.command("stop\n") except: pass