2024-04-27 03:31:51 +00:00
|
|
|
from firepup650 import inputCast, clear
|
|
|
|
|
|
|
|
clear()
|
|
|
|
print("Buckshot Roulette tracker")
|
|
|
|
while 1:
|
|
|
|
print("Please enter the shells for this round.")
|
|
|
|
print("How many live shells?")
|
|
|
|
live = inputCast("> ", int)
|
2024-05-13 16:05:04 +00:00
|
|
|
print("How many blank shells?")
|
2024-04-27 03:31:51 +00:00
|
|
|
blank = inputCast("> ", int)
|
|
|
|
total = blank + live
|
|
|
|
round = 1
|
|
|
|
known = {}
|
|
|
|
for i in range(total):
|
2024-04-27 03:59:57 +00:00
|
|
|
known[str(i + 1)] = ""
|
2024-04-27 03:31:51 +00:00
|
|
|
while total:
|
|
|
|
clear()
|
|
|
|
if known[str(round)]:
|
|
|
|
print(f"Known Shell! Shell is {known[str(round)]}")
|
2024-04-27 03:59:57 +00:00
|
|
|
print(
|
|
|
|
f"""Chance of live shell: {(live/(live+blank if live+blank>0 else 1))*100}%
|
2024-04-27 03:31:51 +00:00
|
|
|
Chance of blank shell: {blank/(live+blank if live+blank>0 else 1)*100}%
|
|
|
|
Shells left: {total} ({blank}B {live}L)
|
2024-04-27 03:59:57 +00:00
|
|
|
Next shell is?"""
|
|
|
|
)
|
2024-04-27 03:31:51 +00:00
|
|
|
next = inputCast("> ").upper()
|
|
|
|
if next in ["B", "L"]:
|
|
|
|
blank = blank - 1 if next == "B" and not known[str(round)] else blank
|
|
|
|
live = live - 1 if next == "L" and not known[str(round)] else live
|
|
|
|
total -= 1
|
|
|
|
round += 1
|
|
|
|
elif "=" in next:
|
|
|
|
num = next.split("=")[0]
|
|
|
|
color = next.split("=")[1]
|
|
|
|
known[num] = "live" if color.upper() == "L" else "blank"
|
|
|
|
blank = blank - 1 if color == "B" else blank
|
|
|
|
live = live - 1 if color == "L" else live
|
|
|
|
elif next == "0":
|
|
|
|
break
|
|
|
|
print("Round End\nExit? (y|N)")
|
|
|
|
if inputCast("> ").lower().startswith("y"):
|
|
|
|
break
|
|
|
|
clear()
|