Added objective count in maze
This commit is contained in:
parent
254e94f912
commit
d61bd47ca8
3 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ public:
|
|||
unsigned int scaling_factor;
|
||||
Texture map;
|
||||
|
||||
unsigned int total_objectives = 0;
|
||||
|
||||
private:
|
||||
const Texture& floor;
|
||||
const Texture& wall;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue