/* This is the heart of the application. This contains the basic game looping code, sets up event handlers, etc. All the hard work will eventually get farmed out to other objects, for now, we're doing almost everything in here. */ #ifndef _GAME_CORE_H_ #define _GAME_CORE_H_ #include "mainevent.h" #include "gamedata.h" #include "sdlrenderer.h" class GameCore : public MainEvent { public: GameCore(); int execute(); protected: // event handlers void on_exit(); void on_lbutton_down(int x, int y); void on_rbutton_down(int mX, int mY); void on_key_down(SDLKey sym, SDLMod mod, Uint16 unicode); private: bool init(); void render(); void cleanup(); bool is_running; SDLRenderer renderer; // data GameData data; static int NODE_RADIUS; static int MAX_MOVE_DISTANCE; }; #endif