aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-22 14:11:32 +0100
committerGravatar jesopo2018-10-22 14:11:32 +0100
commit84b4a064b80f46bf0c0735930c74fd10301e20be (patch)
tree17fa59931b24f7b99111a95eee837b9bf6081bf0 /modules
parentFix copypaste fail in modules/coins.py.move_coins (diff)
signature
Add double streets to !roulette in modules/coins.py
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/coins.py b/modules/coins.py
index b3f44002..e7f0e9fd 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -29,6 +29,7 @@ SECOND_COLUMN = list(range(1, 37))[1::3]
THIRD_COLUMN = list(range(1, 37))[2::3]
REGEX_STREET = re.compile("street([1-9]|1[0-2])$")
+REGEX_DOUBLESTREET = re.compile("2street([1-9]|1[0-1])$")
WALLET_DEFAULT_NAME = "default"
WALLET_DEFAULTS = {"in": WALLET_DEFAULT_NAME, "out": WALLET_DEFAULT_NAME,
@@ -562,6 +563,8 @@ class Module(ModuleManager.BaseModule):
colour = "red" if choice in RED else "black"
for i, bet in enumerate(bets):
street_match = REGEX_STREET.match(bet)
+ doublestreet_match = REGEX_DOUBLESTREET.match(bet)
+
odds = 0
if bet == "even":
odds = 1*((choice % 2) == 0)
@@ -590,6 +593,9 @@ class Module(ModuleManager.BaseModule):
elif street_match:
row = int(street_match.group(1))
odds = 11*(((row*3)-2) <= choice <= (row*3))
+ elif doublestreet_match:
+ row = int(doublestreet_match.group(1))
+ odds = 5*(((row*3)-2) <= choice <= ((row*3)+3))
elif bet.isdigit() and (1 <= int(bet) <= 36):
odds = 35*(choice == int(bet))
else: