Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP3234 Computer and Communication Networks /
ELEC3443 Computer Networks
Programming Assignment: A Simple Game House Application
Total mark is 100.
I. OVERVIEW OF THE ASSIGNMENT
In this assignment, you will implement a simple game house application using Python socket
programming. A game house is an application in which multiple clients connect to a game server, get
authorized, and then select a game room to enter and play a game with another player in the same
room.
1. You will find the traceback module (https://docs.python.org/3.8/library/traceback.html) useful for
printing out stack trace for debugging purpose.
2. You program should have sufficient robustness. In the networked environment, a TCP connection
may be broken, or a remote end host may suddenly leave the system at any step of the dialog. Your
program should be able to properly handle the exceptions thrown, print out error messages
accordingly and end the client program or server thread accordingly. If the exception happens when
two players are playing in a room such that one player is disconnected, the server should notify the
remaining player that it is the winner and return it to the game hall.
3. You will need a state variable remembering which state each client is in, in the server thread
handling this client’s connection
6. You can specify the total number of game rooms in your program.
7. You can assume that user names and passwords do not consist of space(s).
8. You can assume one user does not log in at two or more terminals simultaneously.
9. Programming language and platform
• You should write your program using Python. You can implement it on Windows, Linux, Mac,
etc., with any development environment that you prefer. You can use any Python modules
that you deem useful to implement your program.
• Please pay attention to your programming style, and add comments wherever suitable for
better readability.