From edd9dd1dc997b5d7052b268107de72e45f20ebba Mon Sep 17 00:00:00 2001 From: Augustin Date: Wed, 3 Apr 2024 19:53:40 +0200 Subject: [PATCH] Rename method evolve to tick for consistency --- src/jeu.cpp | 4 ++-- src/jeu.hpp | 2 +- src/screens/gamescreen.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jeu.cpp b/src/jeu.cpp index c8a4aaf..470e6fa 100644 --- a/src/jeu.cpp +++ b/src/jeu.cpp @@ -64,7 +64,7 @@ bool Jeu::init() { return true; } -void Jeu::evolue() { +void Jeu::tick() { if (pause) // Game is paused, don't do anything return; @@ -145,7 +145,7 @@ void Jeu::setDirection(const Direction dir) { if (previousDir == BAS && dir == HAUT) return; - // Add direction to buffer, unpacked in evolue() + // Add direction to buffer, unpacked in tick() directionsBuffer.push(dir); } diff --git a/src/jeu.hpp b/src/jeu.hpp index 50a0c02..7482d8a 100644 --- a/src/jeu.hpp +++ b/src/jeu.hpp @@ -30,7 +30,7 @@ class Jeu { bool init(); - void evolue(); + void tick(); const std::list *getSnake() const; diff --git a/src/screens/gamescreen.cpp b/src/screens/gamescreen.cpp index 9608a2d..78b57c1 100644 --- a/src/screens/gamescreen.cpp +++ b/src/screens/gamescreen.cpp @@ -83,6 +83,6 @@ void GameScreen::keyPressEvent(QKeyEvent *event) { * Tick the game */ void GameScreen::handleTimer() { - jeu.evolue(); + jeu.tick(); update(); }