some server code

This commit is contained in:
Max-Wilhelm Bruker 2009-11-02 17:35:51 +01:00
parent 6923c98dc2
commit 29bf3d3774
18 changed files with 729 additions and 137 deletions

View file

@ -24,7 +24,7 @@
#include <QPointer>
#include <QObject>
#include "server_player.h"
#include "returnmessage.h"
#include "protocol.h"
class Server_Game : public QObject {
Q_OBJECT
@ -55,7 +55,7 @@ public:
int getMaxPlayers() const { return maxPlayers; }
bool getSpectatorsAllowed() const { return spectatorsAllowed; }
QString getGameListLine() const;
ReturnMessage::ReturnCode checkJoin(const QString &_password, bool spectator);
ProtocolResponse::ResponseCode checkJoin(const QString &_password, bool spectator);
Server_Player *addPlayer(const QString &playerName, bool spectator);
void removePlayer(Server_Player *player);
void startGameIfReady();