How skrubzxd/net-programming-final works
Project type and purpose
• This is a Python-based client-server networked number-guessing game.
• The server manages game rooms (2–4 players each), generates secret numbers, enforces turn-based play with timeouts, tracks scoring and leaderboards, and relays chat messages.
• The client application connects to the server, registers the player, sends guesses and chat, and displays feedback.
File structure
• Top-level scripts:
• server.py – server entry point, socket listener, client-handler threads
• client.py – client entry point, connects to server, user I/O
• timer.py – implements timeout logic for turns
• Directory “classes” contains the core game logic / domain model:
• game_message.py, game_message_queue.py – define network message formats and a queue for inter-thread broadcast
• game_progress.py, player_progress.py – manage per-game and per-player state (guesses, attempts, scores)
• player.py, player_list.py – represent individual players and collections of them
• room_list.py – manages active game rooms and player assignments
• send_menu.py – defines server-to-client menu messages and prompts
• unique_random.py – generates the secret number, ensures no duplicates
• No external database; all state is in-memory.
README for additional insights
• Requirements: random secret 1–100, higher/lower hints, turn-based with timeout, scoring, chat, leaderboard, multiple rooms.
• Missing feature: reconnection support (future extension).