Karte.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 "KSGNetwork.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< ObjektStr > *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, int mapId, KSGClient::SpielServerClient *zSpielKlient, Text *zGamePath ); // call 2
  34. // constant
  35. Vec2< int > getSize() const;
  36. Spieler *createSpieler( int sNum, Schrift *zSchrift, KSGClient::InformationServerClient *zInfoK, Animation2DData *zFStart, Animation2DData *zFBurn ) const;
  37. Team *createTeam( int tNum ) const;
  38. SpielObjekt *createObjekt( int oNum, Schrift *zSchrift ) const;
  39. Iterator< ObjektStr * > getObjekte() const;
  40. int getMaxTeamAnzahl() const;
  41. int getMaxSpielerAnzahl() const;
  42. int getObjektAnzahl() const;
  43. int getTeamNummer( int sNum ) const;
  44. // Reference Counting
  45. Karte *getThis();
  46. Karte *release();
  47. };
  48. #endif