Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # created on: Oct 15, 2018
- # Author: Win.thitiwat
- """
- Docstring Part
- """
- import time
- import sys
- # ****************************
- #
- # Start Defining Key Variables
- #
- # ****************************
- TIMER = [
- """
- ██████╗
- ╚════██╗
- █████╔╝
- ╚═══██╗
- ██████╔╝
- ╚═════╝
- """,
- """
- ██████╗
- ╚════██╗
- █████╔╝
- ██╔═══╝
- ███████╗
- ╚══════╝
- """,
- """
- ██╗
- ███║
- ╚██║
- ██║
- ██║
- ╚═╝
- """,
- """
- ███████╗████████╗ █████╗ ██████╗ ████████╗
- ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗╚══██╔══╝
- ███████╗ ██║ ███████║██████╔╝ ██║
- ╚════██║ ██║ ██╔══██║██╔══██╗ ██║
- ███████║ ██║ ██║ ██║██║ ██║ ██║
- ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
- """]
- MISSION = [[1, "Riddle Game (Testing your aptitude to help solve emergency problems)"],
- [2, "Cook for the King (within limited time amount)"],
- [3, ""],
- [4, ""]]
- RIDDLES_QUESTIONS_LIST = [["QUESTION", "ANSWER"],
- ["QUESTION", "ANSWER"]]
- PLAYER_NOTEBOOK = [["EVENT"]]
- KING_DRINK_RECIPE = ["Espresso", "Gingerbread syrup", "Milk", "Gingerbread spice"]
- ALL_RECIPE = [""]
- player = {
- "player_name": "",
- "": "",
- "overall_current_score": 0,
- "done_mission": [],
- "undone_mission": []
- }
- # ****************************
- #
- # End Defining Key Variables
- #
- # ****************************
- # **************************
- #
- # Start program controller
- #
- # ***************************
- def ascii_art_gen_timer():
- """ this function is used to display timer in ascii art format before bonus game starts"""
- for each in TIMER:
- print("\r"+each)
- sys.stdout.flush()
- time.sleep(1)
- def set_player_name(name):
- player["player_name"] = name
- def get_player_name():
- return player.get("player_name")
- def set_player_score(result_condition, score):
- if result_condition:
- player["current_score"] += score
- else:
- player["current_score"] -= score
- def get_player_score():
- return player.get("current_score")
- def get_player_info(info_type):
- if info_type == "all":
- return player
- return player.get(info_type)
- # ***************************
- #
- # End program controller
- #
- # ***************************
- # ***************************
- #
- # Start Game activity flow
- #
- # ***************************
- def game_stage1():
- pass
- def game_stage2():
- pass
- def game_stage3():
- pass
- def game_fail():
- pass
- def game_intro():
- text = "Welcome to Python World\n"
- for each_char in text:
- print(each_char, end="")
- sys.stdout.flush()
- time.sleep(0.3)
- for i in range(3):
- print(". ", end="")
- sys.stdout.flush()
- time.sleep(0.3)
- print("\n\nExcuse me, what's your name...")
- player_name = str(input("I'm: "))
- set_player_name(player_name)
- print(f"Welcome ... {get_player_name()}\n")
- time.sleep(2)
- print(f"""
- You are a prisoner under the ID 24601 who just broke a windowpane and stole a loaf of bread
- to feed your starving daughter. You were judged to be imprisoned for 15 years. Also, you know that your
- daughter has been looked after by a shady hotel's owner and you cannot wait to take her out!!!.
- Luckily, at the 9th year of your imprisonment, you are pardoned by the King of our city and you are given
- with a good job in the Hult Palace.
- """)
- input("\nPress Enter to continue...")
- print(f"""
- Welcome to Hult Palace, you are cordially invited by the king to be in charge of his caretaker.
- !!! But you need to PASS our intensive training first before starting the job!!!
- The perk you will get from this job if you PASS our intensive training:
- 1. Out of the prison
- 2. Free Food/accommodation for your family in the Palace
- 3. Personal guards
- 4. Live like a king, but not
- 5. Lastly, you will find your DAUGHTER
- *** HOWEVER, if you FAIL our training, you will be sent to Alcatraz prison for LIFE IMPRISONMENT ***
- """)
- input("\nPress Enter to continue...")
- def game_start():
- pass
- def main():
- # game_start()
- # temp = input()
- game_intro()
- input()
- ascii_art_gen_timer()
- if __name__ == '__main__':
- main()
- #for x in range (0,5):
- # b = "Loading" + "." * x
- # sys.stdout.write("\r" + b)
- # sys.stdout.flush()
- #
- # time.sleep(1)
Add Comment
Please, Sign In to add comment