Source code for Gege's country guessing quiz game made with Python.
Start the game by running the commands python server.py
and python client.py
in a terminal opened within the project directory.
You will be asked to input the country you think the requested capital belongs to. The game will last until you fail to guess the correct country, even with a hint provided.
Once the game ended, you are given 5 options to choose from:
- Play Again: Your console gets cleared, and a new game starts
- Leaderboard: The top 5 scoring players will be displayed
- Save Score: Choose this option to save your score to the database. You will be asked to provide a username and a password. If the given username does not exist, a new user will be registered
- Reset Score: This option lets you reset your high score to 0 while keeping your account
- Quit: Quits the game
For every correct guess you get 2 points. If a hint was used to guess the correct answer, you only get 1 point. Incorrect guesses do not get any point.
Other than an up-to-date Python, you will need to install sqlite3
. Every other package you see in the project comes with Python by default.