Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from API import *
- import random
- # 0 => 1; 1 => 0
- def change(n):
- if n == 1:
- return 0
- else:
- return 1
- # Generuje blok nahodnych cisel (stejne jako API).
- # Po vygenerovani urciteho poctu (fin) stejnych cisel konci.
- def ntice(fin):
- cnt = 1
- num = random.randint(0, 1)
- while True:
- if random.randint(0, 1) == num:
- cnt += 1
- else:
- cnt = 1
- num = change(num)
- if cnt == fin:
- return num
- # Hraje Martingale
- def martingale(number, stake):
- while True:
- res = game.spin(number, stake)
- if res == number or res == 2:
- return
- else:
- stake *= 2
- for i in range(10000):
- martingale(change(ntice(3)), 0.01)
- if game.getBallance() < 50:
- game.spin(random.randint(0, 1), game.getBallance())
- game.exitGame()
Advertisement
Add Comment
Please, Sign In to add comment