Map.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef Map_H
  2. #define Map_H
  3. #include <Bild.h>
  4. #include <Random.h>
  5. #include <Datei.h>
  6. #include "KSGNetwork.h"
  7. using namespace Framework;
  8. struct Pos
  9. {
  10. short x;
  11. short y;
  12. };
  13. class Map : public virtual ReferenceCounter
  14. {
  15. private:
  16. Array< Pos > *schlange;
  17. Array< Pos > *ziele;
  18. Rahmen *feld;
  19. Rahmen *kam;
  20. Rahmen *map;
  21. Pos kamPos;
  22. bool move;
  23. int score;
  24. int scoreCheck;
  25. int breite;
  26. int höhe;
  27. int geschwindigkeit;
  28. int zAnzahl;
  29. double next;
  30. int richtung;
  31. bool beendet;
  32. int addAnzahl;
  33. int neuAnzahl;
  34. bool sr;
  35. bool rend;
  36. double gameTime;
  37. Datei capture;
  38. Critical cs;
  39. KSGClient::MinigameServerClient *klient;
  40. RandomGenerator *rGen;
  41. public:
  42. // Konstruktor
  43. Map( KSGClient::MinigameServerClient *klient );
  44. // Destruktor
  45. ~Map();
  46. // nicht constant
  47. void reset( Text *zOptionen );
  48. void doPublicMausEreignis( MausEreignis &me );
  49. void doTastaturEreignis( TastaturEreignis &te );
  50. bool tick( double tickVal );
  51. void render( Bild &zRObj );
  52. void speichern();
  53. // constant
  54. int getScore() const;
  55. bool istBeendet() const;
  56. };
  57. #endif