Karte.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef Karte_H
  2. #define Karte_H
  3. #include <Datei.h>
  4. #include <Vec2.h>
  5. #include "../Team/Team.h"
  6. #include "../Spieler/Spieler.h"
  7. #include "../Objekt/SpielObjekt.h"
  8. #include "../../../../../../Klient/Include/KSGKlientV.h"
  9. #include "Strukturen.h"
  10. using namespace Framework;
  11. class Karte
  12. {
  13. private:
  14. Vec2< int > größe;
  15. int spielerAnzahl;
  16. int teamAnzahl;
  17. Array< int > *spielerFarbe;
  18. Array< int > *teamFarbe;
  19. RCArray< Text > *teamName;
  20. Array< int > *teamGröße;
  21. RCArray< RessourceStr > *ressources;
  22. RCArray< ZeichnungStr > *objekte;
  23. RCArray< SpielerStr > *spieler;
  24. RCArray< TeamStr > *teams;
  25. int ref;
  26. public:
  27. // Konstruktor
  28. Karte();
  29. // Destruktor
  30. ~Karte();
  31. // nicht constant
  32. void ladeSts( Datei *zDatei ); // call 1
  33. void ladeMap( Datei *zDatei, InformationKlientV *infoK, int mapId, SpielKlientV *zSpielKlient ); // call 2
  34. // constant
  35. Vec2< int > getSize() const;
  36. Spieler *createSpieler( int sNum, Schrift *zSchrift, InformationKlientV *zInfoK ) const;
  37. Team *createTeam( int tNum ) const;
  38. SpielObjekt *createZeichnung( int oNum, Schrift *zSchrift ) const;
  39. int getMaxTeamAnzahl() const;
  40. int getMaxSpielerAnzahl() const;
  41. int getZeichnungAnzahl() const;
  42. int getTeamNummer( int sNum ) const;
  43. // Reference Counting
  44. Karte *getThis();
  45. Karte *release();
  46. };
  47. #endif