示例#1
0
def instruction_query():
    """
	Offers to open a file on their computer with rules and scoring.
	"""
    print("\nWould you like a score chart/list of rules")
    print("to look at while you play (y/n)?")
    if yes_or_no("Note: this will open a file on your computer. > "):
        try:
            os.startfile("Scorechart.txt")
        except FileNotFoundError:
            Information.make_scoring_file()
            os.startfile("Scorechart.txt")
示例#2
0
def first_time():
    """
	This asks players if they've played the game before. If they say yes
	it prints a short description of the game's rules.
	"""
    while True:
        first_time = input("Is this your first time playing the game? (y/n): ")
        if first_time == "y":
            Information.instructions()
            Information.make_scoring_file()
            break
        elif first_time == "n":
            break
        else:
            print("Please enter 'y' or 'n'")