#ifndef Spiel_H #define Spiel_H #include "SpielKlasse.h" #include #ifdef WIN32 #include "..\Strukturen.h" #include "Statistik\Statistik.h" #else #include "Strukturen.h" #include "Statistik.h" #define HINSTANCE void* #endif class SSKlient; // SpielServer.h class SpielServer; // SpielServer.h using namespace Framework; using namespace Network; class Spiel : public Thread { private: SpielServer* ss; int id; RCArray< SSKlient >* klients; SpielerTeamStruktur* sts; Array< int >* accounts; Array< int >* spielerNummern; Array< int >* status; Array< int >* prozent; Array< bool >* teamAuswahlFertig; SpielKlasse* spiel; StatistikV* statistik; int state; int spielerAnzahl; int karte; HINSTANCE spielDll; int findFreeTeam(); void teamAusgleich(); public: // Konstruktor Spiel(int id, SpielServer* ss); // Destruktor virtual ~Spiel(); // nicht constant void setAccounts(int anzahl, Array< int >* zAccounts); void setKlients(int anzahl, RCArray< SSKlient >* zKlients); void setKarteId(int karteId); bool klientVerbunden(SSKlient* klient); bool klientWechseltTeam(int accountId, int team); bool chatNachricht(const char* nachricht); bool klientGetrennt(SSKlient* zKlient); bool klientTeamAuswahlFertig(int accountId); bool klientBereitZumLaden(int accountId); bool klientSpielLadenProzent(int accountId, int prozent); bool klientBereitZumSpiel(int accountId); bool spielNachricht(int accountId, int len, char* bytes); bool statistikNachricht(int accountId, int len, char* bytes); virtual void thread(); // constant int getId() const; int getSpielerNummer(int accountId) const; }; #endif