Goal: For our final project, we aim to simulate a multiplayer game lobby and ranking system. The program will be given a file containing player usernames and ranks. It will put these “players” into a queue where they will then be sorted into “lobbies” with players of similar ranks.
Current Objective: Organize players into lobbies by rank
Next Objective: Create a “leaderboard” that sorts all players by rank
ADTS:
Player - stores player information
Data:
string username
unsigned int rank
Functions:
void displayName() - sends username to output stream
unsigned int getRank() - returns player’s rank
Lobby - functions as a list of players
Data:
unsigned int size
unsigned int capacity
float averageRank
Functions:
void append(player P) - adds player to lobby
void updateAverage() - recalculates lobby’s average rank
unsigned int getSize() - returns lobby size
float getAverage() - returns average rank of players in lobby