Skip to content

Commit

Permalink
Rename method evolve to tick for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustin-maker committed Apr 3, 2024
1 parent cd63039 commit edd9dd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/jeu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/jeu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Jeu {

bool init();

void evolue();
void tick();

const std::list<Position> *getSnake() const;

Expand Down
2 changes: 1 addition & 1 deletion src/screens/gamescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ void GameScreen::keyPressEvent(QKeyEvent *event) {
* Tick the game
*/
void GameScreen::handleTimer() {
jeu.evolue();
jeu.tick();
update();
}

0 comments on commit edd9dd1

Please sign in to comment.