Added objective count in maze

This commit is contained in:
trotFunky 2019-11-04 14:42:25 +01:00
parent 254e94f912
commit d61bd47ca8
3 changed files with 4 additions and 1 deletions

View file

@ -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();
}

View file

@ -26,6 +26,8 @@ public:
unsigned int scaling_factor;
Texture map;
unsigned int total_objectives = 0;
private:
const Texture& floor;
const Texture& wall;

View file

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