28 bool firsttime =
true;
31 std::unique_ptr<SocketConnection> sockcon;
48 GameBase3D(
int assignmentID, std::string username, std::string apikey)
49 :
bridges(assignmentID, username, apikey) {
53 sockcon = std::make_unique<SocketConnection>(
bridges);
56 float position[] = {0., 0., 0.};
57 scene =
new Scene(
"fps", 90, position);
83 sockcon->registerKeyListener(
p);
This class contains methods to connect and transmit a user's data structure representation to the Bri...
Definition: Bridges.h:50
This class extends the GameBase class to 3D environments.
Definition: GameBase3D.h:22
void render()
Renders the game.
Definition: GameBase3D.h:90
virtual ~GameBase3D()=default
void registerKeyListener(KeypressListener *p)
register a new KeypressListener
Definition: GameBase3D.h:82
void quit()
calling this function causes the game to end.
Definition: GameBase3D.h:107
void setTitle(std::string title)
Set the title of the game.
Definition: GameBase3D.h:114
bool gameover() const
Definition: GameBase3D.h:138
Scene current_scene
Definition: GameBase3D.h:127
virtual void gameLoop()=0
This function is called once per frame of the game.
void setDescription(std::string desc)
Set a short description of the game.
Definition: GameBase3D.h:121
GameBase3D(int assignmentID, std::string username, std::string apikey)
Protected construction prevens direct creation.
Definition: GameBase3D.h:48
Scene getCurrentScene()
Definition: GameBase3D.h:134
void addScene(Scene &sc)
Definition: GameBase3D.h:130
bool debug
Definition: GameBase3D.h:39
virtual void initialize()=0
This function is called once when the game starts.
This is a class in BRIDGES for representing an (n x n)game grid.
Definition: GameGrid.h:398
This is meant to be an internal class, not something that the library user will use....
Definition: SocketConnection.h:34
Support for drawing Bar charts.
Definition: alltypes.h:4