#ifndef Map_H #define Map_H #include #include "Spieler.h" #include #include "KSGNetwork.h" using namespace Framework; class Map : public virtual ReferenceCounter { public: struct Save { int score; int scoreCheck; bool beendet; double gameTime; RCArray< Spieler > *gegner; RCArray< Spieler > *ziele; Spieler *spieler; }; private: RCArray< Spieler > *gegner; RCArray< Spieler > *ziele; Spieler *spieler; Rahmen *feld; Rahmen *kam; Rahmen *map; int kamX; int kamY; int score; int scoreCheck; int breite; int höhe; int geschwindigkeit; int zAnzahl; int neuGegner; bool beendet; double gameTime; Datei capture; Critical cs; KSGClient::MinigameServerClient *klient; RandomGenerator *rGen; char tastenStände; public: // Konstruktor Map( KSGClient::MinigameServerClient *klient ); // Destruktor ~Map(); // nicht constant void reset( Text *zOptionen ); void doPublicMausEreignis( MausEreignis &me ); void doTastaturEreignis( TastaturEreignis &te ); bool tick( double tickVal ); void render( Bild &zRObj ); void speichern(); Save *saveState(); void reloadState( Save *s ); // constant int getScore() const; bool istBeendet() const; bool canGoLeft() const; bool canGoUp() const; bool canGoRight() const; bool canGoDown() const; int getBestOption( bool *left, bool *up, bool *right, bool *down, int maxSteps ); }; #endif