Skip to content

Commit

Permalink
reactivate fast fold
Browse files Browse the repository at this point in the history
  • Loading branch information
dickreuter committed Dec 7, 2023
1 parent 52dbcdf commit 51ab8ad
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion poker/main.py
Expand Up @@ -39,7 +39,7 @@
warnings.filterwarnings("ignore", category=UserWarning)
warnings.filterwarnings("ignore", category=RuntimeWarning)

version = 6.72
version = 6.73
ui = None


Expand Down
54 changes: 27 additions & 27 deletions poker/scraper/table_screen_based.py
Expand Up @@ -187,33 +187,33 @@ def get_table_cards(self, h):

def check_fast_fold(self, h, p, mouse):
# temporarily deactivated
# self.gui_signals.signal_status.emit("Check for fast fold")
# self.gui_signals.signal_progressbar_reset.emit()
# if self.gameStage == "PreFlop":
# m = MonteCarlo()
# crd1, crd2 = m.get_two_short_notation(self.mycards)
# crd1 = crd1.upper()
# crd2 = crd2.upper()
# sheet_name = str(self.position_utg_plus + 1)
# if sheet_name == '6': return True
# sheet = h.preflop_sheet[sheet_name]
# sheet['Hand'] = sheet['Hand'].apply(lambda x: str(x).upper())
# handlist = set(sheet['Hand'].tolist())

# found_card = ''

# if crd1 in handlist:
# found_card = crd1
# elif crd2 in handlist:
# found_card = crd2
# elif crd1[0:2] in handlist:
# found_card = crd1[0:2]

# if found_card == '':
# mouse_target = "Fold"
# mouse.mouse_action(mouse_target, self.tlc)
# log.info("-------- FAST FOLD -------")
# return False
self.gui_signals.signal_status.emit("Check for fast fold")
self.gui_signals.signal_progressbar_reset.emit()
if self.gameStage == "PreFlop":
m = MonteCarlo()
crd1, crd2 = m.get_two_short_notation(self.mycards)
crd1 = crd1.upper()
crd2 = crd2.upper()
sheet_name = str(self.position_utg_plus + 1)
if sheet_name == '6': return True
sheet = h.preflop_sheet[sheet_name]
sheet['Hand'] = sheet['Hand'].apply(lambda x: str(x).upper())
handlist = set(sheet['Hand'].tolist())

found_card = ''

if crd1 in handlist:
found_card = crd1
elif crd2 in handlist:
found_card = crd2
elif crd1[0:2] in handlist:
found_card = crd1[0:2]

if found_card == '':
mouse_target = "Fold"
mouse.mouse_action(mouse_target, self.tlc)
log.info("-------- FAST FOLD -------")
return False

return True

Expand Down

0 comments on commit 51ab8ad

Please sign in to comment.