start working out the Graphics/* code, this is a long way from compiling, let alone working
#ifndef GRAPHICS_GAME_VIEW_HH
#define GRAPHICS_GAME_VIEW_HH
#include "Drawable.hh"
#include "../GameState.hh"
namespace graphics
{
/**
* This is the main in-game view, which is what the player sees when they are playing
*/
class GameView : public Drawable {
protected:
/** The GameState that we're drawing */
GameState &state;
/** The player that we are controlling, if any */
LocalPlayer *player;
public:
/**
* Constructed once the game is running
*/
GameView (GameState &state, LocalPlayer *player) :
state(state), player(player)
{
}
/**
* Set a player where none was set before
*/
void setPlayer (LocalPlayer *player) {
assert(!this->player);
// remember it
this->player = player;
}
/**
* Draw this view onto the given display
*/
void draw (Display *display);
};
}
#endif