From 6923904c6166ebc0ac3e9715f971b3231b5d0022 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 6 Oct 2021 13:30:07 +0200 Subject: [PATCH] Canvas::update=>render --- lib/Canvas.cpp | 2 +- lib/Game.cpp | 2 +- lib/include/Canvas.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Canvas.cpp b/lib/Canvas.cpp index 39eb12b..eae4035 100644 --- a/lib/Canvas.cpp +++ b/lib/Canvas.cpp @@ -29,7 +29,7 @@ Canvas::Canvas() game_font = loadFont("retro_font.ttf"); } -void Canvas::update(const GameState & gameState) { +void Canvas::render(const GameState & gameState) { clear(); renderMaze(); diff --git a/lib/Game.cpp b/lib/Game.cpp index da5eadd..6d9f864 100644 --- a/lib/Game.cpp +++ b/lib/Game.cpp @@ -26,7 +26,7 @@ void Game::run() { accumulator -= delta_time; } - canvas.update(gameState); + canvas.render(gameState); } } diff --git a/lib/include/Canvas.hpp b/lib/include/Canvas.hpp index 2d24672..e2e79e6 100644 --- a/lib/include/Canvas.hpp +++ b/lib/include/Canvas.hpp @@ -14,7 +14,7 @@ using Sprite = sf::Sprite; class Canvas { public: Canvas(); - void update(const GameState & gameState); + void render(const GameState & gameState); std::optional pollEvent(); private: