From 79ab0bdeedd6e7f97b4c246b4319af5eac545061 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 18 Mar 2020 20:50:58 +0100 Subject: game class, display of the game grid --- include/graphics.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/graphics.hpp') diff --git a/include/graphics.hpp b/include/graphics.hpp index 69ac808..0990247 100644 --- a/include/graphics.hpp +++ b/include/graphics.hpp @@ -2,15 +2,20 @@ # define GRAPHICS_HPP #include +#include #include +#include +#include "game.hpp" class Graphics { public: - Graphics(std::string t, int w, int h); + Graphics(Game *g, std::string t, int w, int h); ~Graphics(); void update(); + void drawGame(); + void drawCell(int x, int y); bool isRunning(); private: @@ -18,10 +23,13 @@ class Graphics std::string title; int width; int height; + Game *game; SDL_Renderer *renderer; SDL_Window *window; + TTF_Font *font; void handleEvent(); + void error(); }; #endif -- cgit