Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ones_bonus = (2000 if rolls.count(1) >= 4 else ( 1000 if rolls.count(1) == 3 else 0 ) )
- single_ones_bonus = 100 * max(0, (rolls.count(1) - (4 if ones_bonus == 2000 else 3 if ones_bonus == 1000 else 0)))
- fives_bonus = (200 * 5 if rolls.count(5) >= 4 else ( 100 * 5 if rolls.count(5) == 3 else 0 ) )
- single_fives_bonus = 50 * max(0, (rolls.count(5) - (4 if fives_bonus == 200*5 else 3 if fives_bonus == 100*5 else 0)))
- other_numbers_bonus = sum(100 * i if rolls.count(i) == 3 else (200 * i if rolls.count(i) == 4 else 0) for i in (2, 3, 4, 6))
- return ones_bonus + single_ones_bonus + fives_bonus + single_fives_bonus + other_numbers_bonus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement