Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create hidesike_python #558

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Create hidesike_python #558

wants to merge 1 commit into from

Conversation

kps9004
Copy link

@kps9004 kps9004 commented Oct 17, 2022

import random

places = ["by the fire", "under the table", "behind the car",
"behind a tree", "behind a rock", "under the camper",
"behind the tent", "in a bush", "on the street", "inside a cave",
"in the creek", "in a ditch"]

possible = [True, False]

hidingplace = random.choice(places)
hidingplacetwo = random.choice(places)

if hidingplace == hidingplacetwo:
hidingplacetwo = random.choice(places)

print "You and two friends have gone camping!"
print "You all decide to play hide and seek. You're it first."
print "After you count to 100, you look around..."
print ""

print places[:3]
print places[3:6]
print places[6:9]
print places[9:]
print ""

def findTheFriend():
global hidingplace
global hidingplacetwo
num = 80
seconds = input("Guess a hiding spot: ")
images(seconds)

while num > 0:

    if num == 10:
                print "They are not here... Your friends win... :-("
                print "They were hiding " + hidingplace + " and " + hidingplacetwo + "."
                break    
        
    if seconds == hidingplace:
            print "You found a friend!"
            areyoudone = input("Did you find this friend first? ")
            
            if areyoudone == "yes":
                print "Keep looking!"
                print ""
                num = num + 30
                seconds = input("Guess a hiding spot: ")
                images(seconds)
                
            if areyoudone == "no":
                print "You found both of your friends! You Win!"
                break
            
    if seconds == hidingplacetwo:
            print "You found a friend!"
            areyoudone = input("Did you find this friend first? ")
            
            if areyoudone == "yes":
                print "Keep looking!"
                print ""
                num = num + 30
                seconds = input("Guess a hiding spot: ")
                images(seconds)
                
            if areyoudone == "no":
                print "You found both of your friends! You Win!"
                break
        
    if seconds != hidingplace and seconds != hidingplacetwo:
        # might have to move
        if num == 40 or num == 20:
            kickthecan = random.choice(possible)
            if kickthecan == True:
                print "A friend has kicked the can! Both run and hide in new places!"
                hidingplace = random.choice(places)
                hidingplacetwo = random.choice(places)
                num = num + 30
                
        if seconds not in places:
            print "Must be within the list."
            seconds = input("Guess a hiding spot: ")
            images(seconds)
            
        else:    
            num = num - 10
            print "They are not here! Keep Looking!"
            print "Your timer has dropped! " + str(num) + " seconds left!"
            print ""
            
            seconds = input("Guess a hiding spot: ")
            images(seconds)

def images(seconds):
if seconds == "by the fire":
print " |\ "
print " | \ "
print " | \ "
print " / | "
print " / __ | "
print " / / \ \ "
print " / / \ \ "
print " | | | | "
print " | | | | "
print " \ _/ / "
print " _
/
__ "
print "|__ __ __ _ |"
print "|______________|"

if seconds == "under the table":
    print "    _________    "
    print "  _  |     |  _  "
    print "  |__|  X  |__|  "

if seconds == "behind the car":
    print "    ____    "
    print "  _/ || \_  "
    print "  -o----o-  "
    
if seconds == "behind a tree":
    print "  /\  /\  /\  "     
    print " /__\/__\/__\ "
    print "  ||  ||  ||  "
    
if seconds == "behind a rock":
    print "   _____   "
    print "  /     \  "
    print " |_______| "
    
if seconds == "under the camper":
    print "   __________    "
    print "  |          |   "
    print "  |      ||  \_  "
    print "  -O--------O--  "

if seconds == "behind the tent":
    print "    /\    "
    print "   /  \   "
    print "  / /\ \  "
    print " / /  \ \ "
    
if seconds == "in a bush":
    print "   ____   "
    print "  |_  _|  "
    print "  \_||_/  "
    print "    ||    "

if seconds == "on the street":
    print "  |   |   |  "
    print "  |       |  "
    print "  |   |   |  "
    print "  |       |  "
    print "  |   |   |  "
    
if seconds == "inside a cave":
    print "      /\  /\      "
    print "     /  \/  \     "
    print "    /    \   \    "
    print "   /      \   \   "
    print "  /   __   \   \  "
    print " /   |  |   \   \ "
    
if seconds == "in the creek":
    print "  |  /  /  |  "
    print "  |  \  \  |  "
    print "  |  /  /  |  "
    print "  |  \  \  |  "

if seconds == "in a ditch":
    print "  |  o     |  "
    print "  |     o  |  "
    print "  | O      |  "
    print "  |       o|  "

findTheFriend()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant