예제 #1
0
파일: main.py 프로젝트: 400yk/PokerBotMac
    # check for tesseract
    try:
        pytesseract.image_to_string(Image.open('pics/PP/3h.png'))
    except Exception as e:
        print(e)
        print(
            "Tesseract not installed. Please install it into the same folder as the pokerbot or alternatively set the path variable."
        )
        # subprocess.call(["start", 'tesseract-installer/tesseract-ocr-setup-3.05.00dev.exe'], shell=True)
        sys.exit()

    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()

    ui = Ui_Pokerbot()
    ui.setupUi(MainWindow)
    MainWindow.setWindowIcon(QtGui.QIcon('icon.ico'))

    gui_signals = UIActionAndSignals(ui)

    t1 = ThreadManager(1, "Thread-1", 1, gui_signals)
    t1.start()

    MainWindow.show()
    try:
        sys.exit(app.exec_())
    except:
        print("Preparing to exit...")
        gui_signals.exit_thread = True
예제 #2
0
t.check_for_betbutton() and \
t.check_for_allincall() and \
t.get_current_call_value(p) and \
t.get_current_bet_value(p)

print('ready :', ready)


#p.current_strategy = 'vid_ps_2'
l = MagicMock()
#t.abs_equity = 0.7
#t.checkButton = True

preflop_state = CurrentHandPreflopState()
config = ConfigObj("config.ini")
ui = Ui_Pokerbot()

#t.isHeadsUp = True
#t.gameStage = "Flop"
#p.selected_strategy['FlopBluffMinEquity'] = 0.3
#p.selected_strategy['FlopBluff'] = "1"

m = run_montecarlo_wrapper(p, gui_signals, config, ui, t, t.game_logger, preflop_state, h)
d = Decision(t, h, p, l)
d.make_decision(t, h, p, logger, t.game_logger)



#d.decision = DecisionTypes.check
#t.playersAhead = 0
#d.bluff(t, p, h)
예제 #3
0
파일: main.py 프로젝트: vidmantasb/Poker
    sys.__excepthook__ = exception_hook

    # check for tesseract
    try:
        pytesseract.image_to_string(Image.open('pics/PP/3h.png'))
    except Exception as e:
        print(e)
        print(
            "Tesseract not installed. Please install it into the same folder as the pokerbot or alternatively set the path variable.")
        # subprocess.call(["start", 'tesseract-installer/tesseract-ocr-setup-3.05.00dev.exe'], shell=True)
        sys.exit()

    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()

    ui = Ui_Pokerbot()
    ui.setupUi(MainWindow)
    MainWindow.setWindowIcon(QtGui.QIcon('icon.ico'))

    gui_signals = UIActionAndSignals(ui)

    t1 = ThreadManager(1, "Thread-1", 1, gui_signals)
    t1.start()

    MainWindow.show()
    try:
        sys.exit(app.exec_())
    except:
        print("Preparing to exit...")
        gui_signals.exit_thread = True