diff --git a/src/Maze.cpp b/src/Maze.cpp index 95346ea..88d6754 100644 --- a/src/Maze.cpp +++ b/src/Maze.cpp @@ -43,6 +43,7 @@ Maze::Maze(const std::string& maze_map, unsigned int scaling_factor, const Textu } } + total_objectives = objective_positions.size(); preapre_display_list(); } diff --git a/src/Maze.h b/src/Maze.h index 69ad9f1..3259448 100644 --- a/src/Maze.h +++ b/src/Maze.h @@ -26,6 +26,8 @@ public: unsigned int scaling_factor; Texture map; + unsigned int total_objectives = 0; + private: const Texture& floor; const Texture& wall; diff --git a/src/main.cpp b/src/main.cpp index 993797a..dfcb930 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -53,7 +53,7 @@ void manage_inputs() if (map_colour == Tiles::end) { std::cout << "Success !" << std::endl; - std::cout << "You managed to collect " << score << " raptors!" << std::endl; + std::cout << "You managed to collect " << score << " out of " << maze->total_objectives << " raptors!" << std::endl; glutDestroyWindow(glutGetWindow()); exit(EXIT_SUCCESS); }