Map.h 1.0 KB

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