SpielErstellt.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef SpielErstellt_H
  2. #define SpielErstellt_H
  3. #include <Klient.h>
  4. #include <Thread.h>
  5. #include <Array.h>
  6. using namespace Framework;
  7. using namespace Network;
  8. class SSKlient;
  9. struct SpielerTeamStruktur;
  10. class SpielServer;
  11. class SpielErstellt : public Thread
  12. {
  13. private:
  14. SpielServer *ss;
  15. int id;
  16. int spielArt;
  17. int karte;
  18. int spielerAnzahl;
  19. int verbunden;
  20. Array< int > *accounts;
  21. RCArray< SSKlient > *klients;
  22. Array< int > *status;
  23. int state;
  24. bool abbr;
  25. int spielId;
  26. int ref;
  27. public:
  28. // Konstruktor
  29. SpielErstellt( int id, SpielServer *ss );
  30. // Destruktor
  31. virtual ~SpielErstellt();
  32. // nicht constant
  33. void abbruch();
  34. void sendeVerbindungsBefehl();
  35. bool klientVerbunden( SSKlient *klient );
  36. bool klientNimmtAn( int accountId );
  37. bool klientLehntAb( int accountId );
  38. bool klientGetrennt( SSKlient *zKlient );
  39. virtual void thread();
  40. // constant
  41. int getId() const;
  42. // Reference Counting
  43. SpielErstellt *getThis();
  44. SpielErstellt *release();
  45. };
  46. class SpielFinden : public Thread
  47. {
  48. private:
  49. SpielServer *ss;
  50. bool end;
  51. int spielServerId;
  52. int ref;
  53. public:
  54. // Konstruktor
  55. SpielFinden( SpielServer *ss );
  56. // Destruktor
  57. virtual ~SpielFinden();
  58. // nicht constant
  59. void setEnde();
  60. void setSpielServerId( int id );
  61. virtual void thread();
  62. // constant
  63. // Reference Counting
  64. SpielFinden *getThis();
  65. SpielFinden *release();
  66. };
  67. #endif