Skip to content

Commit

Permalink
Merge pull request #13 from zachtalmadge/readME-rules
Browse files Browse the repository at this point in the history
updates README
  • Loading branch information
wesmith3 authored Nov 7, 2023
2 parents bd4e428 + 4f97483 commit 527ec46
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ Upon starting the game, you will be presented with:
2. A selection of categories to choose from.
3. A board of questions with varying point values.

To select a question, type the category and point value (e.g., `Science 200`).
To select a question, type the category (e.g., `Javascript`) and then the desired point value (e.g. `200`)

To answer a question, simply type in your answer after the prompt. Remember to phrase it in the form of a question!

If you need help or wish to exit the game, type `help` or `exit` at any prompt.
To answer a question, simply type in your answer after the prompt (No need to add the `What is..` as we provided it).

## Contributors

Expand Down
5 changes: 4 additions & 1 deletion lib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
welcome,
menu,
exit_program,
find_or_create_player
find_or_create_player,
view_rules
)

def main():
Expand All @@ -13,6 +14,8 @@ def main():
exit_program()
elif choice == "1":
find_or_create_player()
elif choice == "3":
view_rules()
else:
print("Invalid choice")

Expand Down
10 changes: 10 additions & 0 deletions lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ def menu():
def exit_program():
console.print("Goodbye!", style="subhead")
exit()

def view_rules():
console.print("Welcome to Jeopardy!", style="subhead")
console.print("Here are the rules:", style="subhead")
print("1. There are categories with questions of varying point values.")
print("2. Select a category and point value.")
print("3. Answer the question correctly to earn points.")
print("4. Incorrect answers result in point deduction.")
print("5. The player will earn a score at the end of the game.")
print("6. High scores will be added to the leaderboard.")

def find_or_create_player():
name = input("Enter your name: ").strip()
Expand Down

0 comments on commit 527ec46

Please sign in to comment.