34aa81447b74b182fcfc419ba02e7e1cbed95292,poker/table_analysers/table_screen_based.py,TableScreenBased,get_total_pot_value,#TableScreenBased#Any#,581
Before Change
pil_image = self.crop_image(self.entireScreenPIL, self.tlc[0] + func_dict["x1"], self.tlc[1] + func_dict["y1"],
self.tlc[0] + func_dict["x2"], self.tlc[1] + func_dict["y2"])
value = self.get_ocr_float(pil_image, "TotalPotValue", force_method=1)
try:
if not str(value) == "":
value = float(re.findall(r"\d{1,2}\.\d{1,2}", str(value))[0])
except:
self.logger.warning("Total pot regex problem: " + str(value))
value = ""
self.logger.warning("unable to get pot value")
self.gui_signals.signal_status.emit("Unable to get pot value")
pil_image.save("pics/ErrPotValue.png")
self.totalPotValue = h.previousPot
if value == "":
self.totalPotValue = 0
else:
self.totalPotValue = value
After Change
screenshot_pilImage = self.crop_image(self.entireScreenPIL, self.tlc[0] + func_dict["x1"], self.tlc[1] + func_dict["y1"],
self.tlc[0] + func_dict["x2"], self.tlc[1] + func_dict["y2"])
self.totalPotValue = self.find_value("total_pot_value", screenshot_pilImage, 0.01)
if self.totalPotValue != "":
self.totalPotValue = float(self.totalPotValue)
if self.totalPotValue == "":
self.totalPotValue = 0
self.logger.warning("Total pot regex problem: " + str(value))
self.gui_signals.signal_status.emit("Unable to get pot value")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_total_pot_value
Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_round_pot_value
Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_bot_pot