1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef Spiel_H
- #define Spiel_H
- #include "SpielKlasse.h"
- #include <Array.h>
- #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( 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
|