Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import json
- import datetime
- from functions import get_score_list
- from functions import play_game_easy
- from functions import play_game_hard
- current_time = datetime.datetime.now()
- secret = random.randint(1, 5)
- attempts = 0
- name = input("Please enter your name: ")
- wrong_guesses = []
- score_list =[]
- while True:
- choice = input("Please choose one of the following options: Press 1 to see the highscores, press 2 to play a new game, press 3 to quit: ")
- if choice == "1":
- get_score_list()
- if choice == "2":
- difficulty = input ("Please enter the difficulty level for your game: easy or hard: ")
- if difficulty == "easy":
- play_game_easy(attempts, secret, score_list, name, wrong_guesses, datetime, json)
- elif difficulty == "hard":
- play_game_hard(attempts, secret, score_list, name, wrong_guesses, datetime, json)
- if choice == "3":
- print("Thanks for playing!")
- break
Add Comment
Please, Sign In to add comment