Map.h 828 B

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