#include <ResourceManager.h>
Public Member Functions | |
CResourceManager () | |
CResourceManager. | |
~CResourceManager () | |
~CResourceManager | |
void | CollectResources (vector< CResource * > resources) |
CollectResources. | |
void | CollectResources (CResource *resource) |
CollectResources. | |
void | GetResourceList (vector< CResource * > &resources) |
GetResourceList. | |
vector< CMatch * > | SetupRound (const CRound *round) |
SetupRound. | |
bool | SetupMatch (CMatch *match, vector< CResource * > AvailResources) |
SetupMatch. | |
Protected Member Functions | |
void | SortResources () |
SortResources. |
Description: The ResourceManager class manages the assigment of players to client machines.
Limitations: None
|
CResourceManager. Description: The constructor initializes internal class attributes.
|
|
~CResourceManager Description: Destructor included for maintenace purposes only.
|
|
CollectResources. Description: Adds a single resource to the list of resources that will be used during game configuration.
|
|
CollectResources. Description: Adds a vector of resources to the list of resourcese that will be used during game configuation.
|
|
GetResourceList. Description: This function returns the list of resources that will be used during game configuration.
|
|
SetupMatch. Description: This function setups clients for a match. The function will try to load the players faily according to the following rules: 1) Human and AIs will each receive their own machine whenever possible. 2) If all machines has an assigment, Humans and AIs will share a machine. 3) As a last resort, two AIs will be assigned the same machine.
|
|
SetupRound. Description: Given a tournament round, this function assigns players to resources in the most fair manner possible. See SetupMatch for specifics.
|
|
SortResources. Description: Sorts the resource list according. The sort is arranged with the resources with the highest benchmark value first.
|