This repo is an implementation of a multiplayer quiz game using socket programming.
TCP/IP was used to create the application stack. Python was chosen, due to its easy to code nature.
- Game starts once the maximum number of players have joined.
- Questions are sent to the players with options.
- Players need to answer the question within 60 secs.
- If a player fails to answer within the time limit or answers with the wrong answer, the player will get kicked out.
- At the end, players who have answered all the questions can see the leaderboard. The leaderboard is set according to the average time taken by a player to answer a question.
One can edit the questions in the game by editing the question.csv file.
Do not remove the first and last lines of the question.csv file.
The questions and options should be in the following format:
<question number>,<question>,<option a>,<option b>,<option c>,<option d>,<ans: correct option>
line __:
defines the total number of players.
line __:
defines the IP Address of the server.
line __:
defines the Port the server is connected to.
Run the following
python3 server.py
Run the following
python3 client.py
Enter the correct Host IP Address and Port to join the game.