-
Notifications
You must be signed in to change notification settings - Fork 0
/
PokerDart.py
32 lines (32 loc) · 883 Bytes
/
PokerDart.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# quick program to calculate when to reset cost of Poker Dart to 0
# assumes only one reset is available
for i in range(100):
cost = 0
mana = 100
casts = 0
if i == 0:
mostcasts = 0
clear = 1
clearpoint = 1
manareset = 0
cleared = False
while mana > 0 and cost < mana:
mana -= cost
casts += 1
cost += 1
if not cleared:
if cost == clear:
manareset = cost
cost = 0
cleared = True
if casts > mostcasts:
mostcasts = casts
clearpoint = clear
manaresetforrealthistime = manareset
clear += 1
print("The most casts you can get with the given mana is:")
print(mostcasts)
print("The amount of casts you should reset at is:")
print(clearpoint)
print("the mana cost at this time is:")
print(manaresetforrealthistime)