richelbilderbeek / djog_unos_2018

Project by the Uno's at DJOG 2018-2019: Nature Zen
GNU General Public License v3.0
6 stars 2 forks source link

game::remove_tile must use STL classes only #518

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

Is your feature request related to a problem? Please describe.

Currently, this is a member function of game:

void game::game::remove_tile(sf::RenderWindow& window, sfml_camera& camera)

All that is needed is the position of the mouse:

    if (contains(m_tiles.at(i),
          sf::Mouse::getPosition(window).x + camera.x,
          sf::Mouse::getPosition(window).y + camera.y))
    {

Describe the solution you'd like

Rewrite the function to only use the coordinats of the mouse:

void game::remove_tile(const double mouse_x, const double mouse_y)

Sure, the call to that function must be changed.

Describe alternatives you've considered

None.

Additional context

None.