Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wins = 1
- losses = 1
- winloss = 0
- import winsound
- import time
- import pygame
- ###################################################################
- #Opens username/password text files and defines username.txt
- #as "user" and password.txt as "password"
- def rps():
- f = open("username.txt","r")
- user = f.read()
- f.close()
- f = open("password.txt","r")
- password = f.read()
- f.close()
- game = input("What game do you want to play?")
- if game == "rock paper scissors":
- rps()
- else:
- print ("reee")
- exit()
- #A new variable to determine if the input is the same as the
- #username/password in the txt files
- userCheck = input("Please enter your username")
- passwordCheck = input("Please enter your password")
- time.sleep(3)
- print("0####0000000000000000####0000000000000000############0000000000000000################0000")
- time.sleep(0.25)
- print("0####0000000000000####000000000000000000##############000000000000000000000####0000000000")
- time.sleep(0.25)
- print("0####000000000####000000000000000000000####00000000####00000000000000000000####0000000000")
- time.sleep(0.25)
- print("0####000000####00000000000000000000000####0000000000####0000000000000000000####0000000000")
- time.sleep(0.25)
- print("0####000####0000000000000000000000000####000000000000####000000000000000000####0000000000")
- time.sleep(0.25)
- print("0####0####00000000000000000000000000####00000000000000####00000000000000000####0000000000")
- time.sleep(0.25)
- print("0#######000000000000000000000000000########################0000000000000000####0000000000")
- time.sleep(0.25)
- print("0####0####000000000000000000000000##########################000000000000000####0000000000")
- time.sleep(0.25)
- print("0####0000####00000000000000000000####00000000000000000000####00000000000000####0000000000")
- time.sleep(0.25)
- print("0####0000000####0000000000000000####0000000000000000000000####0000000000000####0000000000")
- time.sleep(0.25)
- print("0####0000000000####000000000000####000000000000000000000000####000000000000####0000000000")
- time.sleep(0.25)
- print("0####0000000000000####00000000####00000000000000000000000000####00000000000####0000000000")
- time.sleep(0.25)
- print("0####0000000000000000####0000####0000000000000000000000000000####0000################0000")
- #If the username and password in the txt files are the same as
- #the username and password inputted by the user, then it will
- #print access granted and allow you to use the program, if not
- #then it will print invalid username/password and quit the program.
- if (user) == (userCheck) and (password) == (passwordCheck):
- print ("Access permitted. Welcome",user)
- else:
- print ("Invalid username/password. Access denied.")
- exit()
- ###################################################################
- while True:
- import random
- from random import randint
- choice = int(input("1 = rock 2 = paper 3 = scissors"))
- choicePC = random.randint(1,3)
- #Rock outcomes
- if (choice) == 1 and (choicePC) == 1:
- print ("The computer chose Rock. Draw!")
- if (choice) == 1 and (choicePC) == 2:
- print ("The computer chose Paper. Loss!")
- losses = losses +1
- if (choice) == 1 and (choicePC) == 3:
- print ("The computer chose Scissors. Win!")
- wins = wins +1
- #Paper outcomes
- if (choice) == 2 and (choicePC) == 1:
- print ("The computer chose Rock. Win!")
- wins = wins +1
- if (choice) == 2 and (choicePC) == 2:
- print ("The computer chose Paper. Draw!")
- if (choice) == 2 and (choicePC) == 3:
- print ("The computer chose Scissors. Loss!")
- losses = losses +1
- #Scissor outcomes
- if (choice) == 3 and (choicePC) == 1:
- print ("The computer chose Rock. Loss!")
- losses = losses +1
- if (choice) == 3 and (choicePC) == 2:
- print ("The computer chose Paper. Win!")
- wins = wins +1
- if (choice) == 3 and (choicePC) == 3:
- print ("The computer chose Scissors. Draw!")
- #Secret outcome
- if (choice) == 4:
- print ("8===D Penis beats everything. Epic gamer win!")
- wins = wins + 100
- winloss = wins/losses
- winsound.Beep(200, 750)
- winsound.Beep(300, 750)
- winsound.Beep(400, 750)
- winsound.Beep(32767, 750)
- #Stats
- print ("--------------------------")
- print ("")
- print ("Win Total:",wins)
- print ("Loss Total:",losses)
- print ("W/L Ratio:",winloss)
- print ("")
- print ("--------------------------")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement