Add strategy NUMBER_X
This commit is contained in:
@@ -594,6 +594,14 @@ Allowed values for `chat` are:
|
||||
- **PERCENTAGE**: Select the option with the highest percentage based on odds (It's the same that show Twitch) - Should be the same as select LOWEST_ODDS
|
||||
- **SMART_MONEY**: Select the option with the highest points placed. [#331](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/331)
|
||||
- **SMART**: If the majority in percent chose an option, then follow the other users, otherwise select the option with the highest odds
|
||||
- **NUMBER_1**: Always select the 1st option, BLUE side if there are only two options
|
||||
- **NUMBER_2**: Always select the 2nd option, PINK side if there are only two options
|
||||
- **NUMBER_3**: Always select the 3rd option.
|
||||
- **NUMBER_4**: Always select the 4th option.
|
||||
- **NUMBER_5**: Always select the 5th option.
|
||||
- **NUMBER_6**: Always select the 6th option.
|
||||
- **NUMBER_7**: Always select the 7th option.
|
||||
- **NUMBER_8**: Always select the 8th option.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -14,6 +14,14 @@ class Strategy(Enum):
|
||||
PERCENTAGE = auto()
|
||||
SMART_MONEY = auto()
|
||||
SMART = auto()
|
||||
NUMBER_1 = auto()
|
||||
NUMBER_2 = auto()
|
||||
NUMBER_3 = auto()
|
||||
NUMBER_4 = auto()
|
||||
NUMBER_5 = auto()
|
||||
NUMBER_6 = auto()
|
||||
NUMBER_7 = auto()
|
||||
NUMBER_8 = auto()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -235,6 +243,12 @@ class Bet(object):
|
||||
largest = index
|
||||
return largest
|
||||
|
||||
def __return_number_choice(self, number) -> int:
|
||||
if (len(self.outcomes) > number):
|
||||
return number
|
||||
else:
|
||||
return 0
|
||||
|
||||
def skip(self) -> bool:
|
||||
if self.settings.filter_condition is not None:
|
||||
# key == by , condition == where
|
||||
@@ -283,6 +297,22 @@ class Bet(object):
|
||||
self.decision["choice"] = self.__return_choice(OutcomeKeys.ODDS_PERCENTAGE)
|
||||
elif self.settings.strategy == Strategy.SMART_MONEY:
|
||||
self.decision["choice"] = self.__return_choice(OutcomeKeys.TOP_POINTS)
|
||||
elif self.settings.strategy == Strategy.NUMBER_1:
|
||||
self.decision["choice"] = self.__return_number_choice(0)
|
||||
elif self.settings.strategy == Strategy.NUMBER_2:
|
||||
self.decision["choice"] = self.__return_number_choice(1)
|
||||
elif self.settings.strategy == Strategy.NUMBER_3:
|
||||
self.decision["choice"] = self.__return_number_choice(2)
|
||||
elif self.settings.strategy == Strategy.NUMBER_4:
|
||||
self.decision["choice"] = self.__return_number_choice(3)
|
||||
elif self.settings.strategy == Strategy.NUMBER_5:
|
||||
self.decision["choice"] = self.__return_number_choice(4)
|
||||
elif self.settings.strategy == Strategy.NUMBER_6:
|
||||
self.decision["choice"] = self.__return_number_choice(5)
|
||||
elif self.settings.strategy == Strategy.NUMBER_7:
|
||||
self.decision["choice"] = self.__return_number_choice(6)
|
||||
elif self.settings.strategy == Strategy.NUMBER_8:
|
||||
self.decision["choice"] = self.__return_number_choice(7)
|
||||
elif self.settings.strategy == Strategy.SMART:
|
||||
difference = abs(
|
||||
self.outcomes[0][OutcomeKeys.PERCENTAGE_USERS]
|
||||
|
||||
Reference in New Issue
Block a user