00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLAYERS_LIST_H_
00024 #define __PLAYERS_LIST_H_
00025
00026 #include "global.h"
00027 #include "player.h"
00028 #include <QList>
00029 #include <QMap>
00030
00031 class PlayersList;
00032
00033 #define PairPlayersByTeams int, PlayersList
00034
00039 typedef QMap<PairPlayersByTeams> PlayersByTeams;
00040
00041 class MAIN_EXPORT PlayersList : public QList<Player>
00042 {
00043 public:
00047 void bots(PlayersList& botsList) const;
00048
00052 void botsWithoutTeam(PlayersList& botsList) const;
00053
00054 int numBots() const;
00055 int numBotsOnTeam(int team) const;
00056 int numBotsWithoutTeam() const;
00057
00061 int numClients() const;
00062 int numClientsWithoutBots() const;
00063
00064 int numHumansInGame() const;
00065 int numHumansOnTeam(int team) const;
00066 int numHumansWithoutTeam() const;
00067 int numPlayersOnTeam(int team) const;
00068 int numSpectators() const;
00069
00079 void inGamePlayersByTeams(QMap<PairPlayersByTeams>& playersListMap) const;
00080
00081 void spectators(PlayersList& spectatorsList) const;
00082
00083 };
00084
00085 #endif