FORE - GAME | A SIMPLE MIND BOOGLING GAME MADE ON PYCHARM | SIMPLE & EASY TO MAKE | VERY TRICKY AND COOL | PYTHON

FORE - GAME


HEY GUYS,


Today we will see how to write a very long professional code using a Game done on Python. I am serious and this code is 300 lines.

You can say to a friend that you are a professional coder and have coded a 300 line program.



So, here is the code to copy and use it.

def Game():
import time,pyautogui,pyttsx3,webbrowser
print("ForeGame : The Theft")
time.sleep(2)
print("Welcome to the game! ")
time.sleep(1)
Play_or_Exit = input("Do you want to Play or Exit?(Enter Play to play the game and Exit to exit the game) : ")
if Play_or_Exit.lower() == "play":
time.sleep(1)
print("Welcome to the Game!")
time.sleep(1)
Name = input("Enter your Nickname or Real Name: ")
time.sleep(1)
time.sleep(1)
print("Again, Welcome to the Game ,",Name)
time.sleep(2)
print("Preparing Game...")
time.sleep(3)
print("Preparing Story...")
time.sleep(3)
print("""This is a Story based Theft Game Where you have to enter an Option to get an Certain outcome. You
will not be revealed the story but you have to guess the story's main objective by playing the game. The city in which you Live is the THE UNITED NATIONS.""")
time.sleep(3)
print("Now let the Game begin...")
pyautogui.countdown(10)
A = pyttsx3.init()
A.say("""
BREAKING NEWS! GOLD BARS WORTH 50 BILLION $ ARE STOLEN FROM THE BANK OF THE UNITED NATIONS.""")
A.say("THE POLICE ARE YET TO FIND THE CRIMINALS.")
print("""News in TV:
BREAKING NEWS! GOLD BARS WORTH 50 BILLION $ ARE STOLEN FROM THE BANK OF THE UNITED NATIONS""")
print("THE POLICE ARE YET TO FIND THE CRIMINALS.""")
A.runAndWait()
print(Name, ": I hope the Money was in my hands. It would be a Luxurious Life that i would be living in.")
time.sleep(1)
Theft = input("Would you steal the 50 Billion $ or Be a good guy? (Enter Steal or Good 'ONLY'): ")
time.sleep(1)
if Theft.upper() == "GOOD":
time.sleep(1)
print("You are a Good Guy and You are out of the Game.")
elif Theft.upper() == "STEAL":
time.sleep(1)
print("Ok, You continue to be in the Game to Steal the 50 Billion $")
time.sleep(1)
print(Name,":Now, I will Get to My car and go to the Airport.")
time.sleep(1)
print("Vroom, Vroom, Vrooooom.")
time.sleep(1)
print("After 10 Minutes = 10 Sec in Real.")
time.sleep(10)
print(Name,":Ha ha There we are at the airport. Let me see which airplane did the Criminals Hid the Gold Bars.")
time.sleep(1)
print("Game:There are two ways to get in : One is By Going to the Runway, the other by Going through the airport.")
time.sleep(1)
Choose = input("What would you Choose (Runway/Airport): ")
time.sleep(1)
if Choose.lower() == "runway":
print("Oh, you have escaped from the Police and got staright to the Runway.")
time.sleep(1)
print("There is an Airplane which is used by the Criminals. There are only three planes and they all are identical. Which would you choose.")
time.sleep(1)
choose = input("Which plane would you choose (1st,2nd,3rd)(Enter 1 or 2 or 3): ")
time.sleep(1)
if choose == "1":
time.sleep(1)
print("Got into the Wrong Plane and was shot dead by the Police.")
time.sleep(1)
print("play again? ")
time.sleep(1)
Game()
elif choose == "2":
time.sleep(1)
print("On the Right plane. You have got hands on the Criminals.")
time.sleep(1)
time.sleep(1)
print("Game: You have Succesfully Found the criminals. Would you kill them or request them the money.")
time.sleep(1)
Kill_or_Request = input("Would you Kill or Request for the money(Enter request or Kill) : ")
time.sleep(1)
if Kill_or_Request.upper() == "KILL":
time.sleep(1)
print("Ok, You chose to kill them.")
time.sleep(1)
print("Now, you have Three weapons to choose from: A Gun, A knife, A grenade. What would you Choose? ")
time.sleep(1)
Weapons = input("Enter the weapon you would choose: ")
time.sleep(1)
if Weapons.upper() == "GUN":
time.sleep(1)
print("Doom Doom Dom Bam Bash!")
time.sleep(1)
print("You Shot Everyone! Hooray")
time.sleep(1)
print("Taking the money...")
time.sleep(4)
print("Approaching the car in ")
pyautogui.countdown(5)
print("Loading the Money.")
time.sleep(1)
print("Vroom Vroom Vroooom.")
time.sleep(1)
print("You Reached Home and now have 1 more last Decision to take.")
time.sleep(1)
Decision = input("Enter where you would give the money. ( Charity, Bank of THE UNITED NATIONS, Have it for yourself, Burn It. ")
time.sleep(1)
if Decision.upper() == "CHARITY":
time.sleep(1)
print("You have done a good job, but the police have found you and arrested you.")
time.sleep(1)
print("You died...😵😵😵")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Decision.lower() == "bank":
time.sleep(1)
print("You have done a Good job in returning the money to the bank.")
time.sleep(1)
Voice = pyttsx3.init()
Voice.say("BANK OFFICER:Thanks for Getting the Money back to the Bank. As a help and Reward We give all the Money to You. ")
Voice.runAndWait()
time.sleep(1)
print(Name,":Oh thank you sir.")
time.sleep(1)
print(Name,":That's how you need to steal the Money without exposing your real Mind.")
time.sleep(1)
print("Game: ",Name," Goes to Home with his Money and Becomes Rich.")
time.sleep(1)
print("After 5 years...")
time.sleep(10)
print(Name,":I AM THE RICHEST GUY IN THE WHOLE OF THE WORLD.")
time.sleep(1)
print("""THE END!""")
time.sleep(1)
pyautogui.alert("THE END!")
time.sleep(5)
pyautogui.alert("THE END!")
time.sleep(5)
pyautogui.alert("THE END!")
time.sleep(5)
pyautogui.alert("THE END")
time.sleep(5)
webbrowser.open("https://blogsbymichel.blogspot.com")
time.sleep(2)
webbrowser.open("https://blogsbymichel.blogspot.com")
time.sleep(2)
webbrowser.open("https://blogsbymichel.blogspot.com")
time.sleep(2)
webbrowser.open("https://blogsbymichel.blogspot.com")
time.sleep(2)
webbrowser.open("https://blogsbymichel.blogspot.com")
time.sleep(2)
elif Weapons.upper() == "KNIFE":
time.sleep(1)
print("You could not kill everyone with a single knife.")
time.sleep(1)
print("You died!")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Weapons.upper() == "GRENADE":
time.sleep(1)
print("You Burnt the Money and you lost everything.")
time.sleep(1)
print("you are Eliminated.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Weapons.isdigit() == True:
time.sleep(1)
print("Integers are not allowed.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
else:
time.sleep(1)
print("This is not accepted.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Kill_or_Request.upper() == "Request":
time.sleep(1)
print("You died because they killed you.")
time.sleep(1)
print("Play again?")
time.sleep(1)
Game()
elif Kill_or_Request.lower() == "exit":
time.sleep(1)
print("Why do you want to Exit the Game?")
time.sleep(1)
print(input("Give us your Feedback: "))
time.sleep(1)
print("Ok, Thanks For your Feedback.")
time.sleep(1)
elif Kill_or_Request.isdigit() == True:
time.sleep(1)
print("Integers are not allowed.")
time.sleep(1)
print("So, Play Again?")
time.sleep(1)
Game()
else:
time.sleep(1)
print("Not Acceptable.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif choose == "3":
time.sleep(1)
print("Got into the Wrong Plane and was shot dead by the Police.")
time.sleep(1)
print("play again? ")
time.sleep(1)
Game()
elif choose.lower() == "exit":
time.sleep(1)
print("Why do you want to Exit the Game?")
time.sleep(1)
print(input("Give us your Feedback: "))
time.sleep(1)
print("Ok, Thanks For your Feedback.")
time.sleep(1)
else:
time.sleep(1)
print("Not Acceptable.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Choose.lower() == "airport":
time.sleep(1)
print("The Police got you sneaking away...")
time.sleep(1)
print("Your are Dead...😵😵😵")
time.sleep(1)
print("Play Again...")
time.sleep(1)
Game()
elif Choose.isdigit() == True:
time.sleep(1)
print("Integers are Not allowed.")
time.sleep(0.5)
print("YOU DIED BECAUSE YOU ENTERED THIS.")
time.sleep(1)
print("Play Again?...")
Game()
elif Choose.lower() == "exit":
time.sleep(1)
print("Why do you want to Exit the Game?")
time.sleep(1)
print(input("Give us your Feedback: "))
time.sleep(1)
print("Ok, Thanks For your Feedback.")
else:
time.sleep(1)
print("This is not an Appropriate Answer.")
time.sleep(0.5)
print("YOU DIED BECAUSE YOU ENTERED THIS.")
time.sleep(1)
print("Play Again?")
time.sleep(1)
Game()
elif Theft.isdigit() == True:
time.sleep(1)
print("Integers are Not allowed.")
time.sleep(0.5)
print("YOU DIED BECAUSE YOU ENTERED THIS.")
elif Theft.upper() == "EXIT":
time.sleep(1)
print("Why do you want to Exit the Game?")
time.sleep(1)
print(input("Give us your Feedback: "))
time.sleep(1)
print("Ok, Thanks For your Feedback.")
else:
time.sleep(1)
print("This is not an Appropriate Answer.")
time.sleep(0.5)
print("YOU DIED BECAUSE YOU ENTERED THIS.")
elif Play_or_Exit.lower() == "exit":
print("Bye. Hope you will Play the Game Sometime later. ☹️☹️☹️")
elif Play_or_Exit.isdigit() == True:
print("Integers are Not allowed.")
time.sleep(1.5)
print("Play Again? ")
time.sleep(3)
Game()
else:
print("This is not an Appropriate Function.")
time.sleep(1.5)
print("Play Again? ")
time.sleep(3)
Game()

Game()

This Game took me about 3 days to make with some gaps in between.

This code is very long to explain, So I will be explaining it in the next Post.

Run this code on Datalore (An website compiler by Jetbrains) or on Pycharm

(An IDE by Jetbrains) or in vs code



Hope you Like the Game and do Enjoy playing it with your family members and friends.

Meet you at the Next Post, Until then Bye!

Share this with every single one you know to get me at least 50 views per day

By the BLOG AUTHOR.






Comments

Post a Comment