Thursday, February 28, 2019

Dylan's friends game Part 3 friends game editing

Part 3 friends game
I need to fix the friends guessing game but my next approach for my next open lab is for the guesser to get hints. Right now, my game is programmed by luck so the guesser would have to really know the show in order to play and have chance on their side. I'm going to program the game so that people who watches friends have an idea of guessing the random character. It's still having problems on saying the random answer and stuff.

#guessing name game
#!= means is not
#guessing tries += 1 every try
import random
secret_name = ['Gunther','Monica','Rachel','Chandler','Joey','Phoebe','Ross','Carol','Ben','Emma','Richard','Janice','Jill'] 
rand_secret_name = secret_name[random.randrange(len(secret_name))]
guess = ""
guess_count = 0
guess_midpoint = 5
guess_limit = 10
out_of_guesses = False
print("you get 10 tries!")

while guess != secret_name and not(out_of_guesses):
    if guess_count < guess_limit:
        guess = input("Guess the name: ")
        guess_count += 1
        if guess == secret_name[random.randrange(len(secret_name))]:
            print("correct")
            print ("Did it in", guess_count)
            out_of_guesses = True
        elif guess == "Monica":
            print("not her, try again")
        elif guess == "Rachel":
            print("Ain't the spoil one but person likes her")
        elif guess == "Chandler":
            print("Not the funny one")
        elif guess == "Joey":
            print("Not actor")
        elif guess == "Phoebe":
            print("doesn't play the guitar")
        elif guess == "Ross":
            print("Aint the dinosaur dude")
        elif guess == "Carol":
            print("not her or her lesbo partner")
        elif guess == "Ben":
            print("not baby")
        elif guess == "Emma":
            print("not baby")
        elif guess == "Richard":
            print("not Monica's ex")
        elif guess =="Janice":
            print("Oh! my! God! No it's not her")
        elif guess =="Jill":
            print("aint no anynoying poop")
        elif guess =="Gunther":
            print("his life isn't that sad")
           
        else:
            print("someone from friends")

    else:
        out_of_guesses = True
       
if out_of_guesses:
     print("out of guesses, you lost boi!",'its', guess == secret_name[random.randrange(len(secret_name))])
   
else:
    print("you won!")   
 




No comments:

Post a Comment