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

Clumsy and untested game::confirm_tile_move #519

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

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

Currently, game has this member function:

void game::confirm_tile_move(tile& t, int direction, int tile_speed){
  switch (direction)
  {
    case 1:
      t.set_dy(-tile_speed);
      return;
    case 2:
      t.set_dx(tile_speed);
      return;
    case 3:
      t.set_dy(tile_speed);
      return;
    case 4:
      t.set_dx(-tile_speed);
      return;
    default:
      return;
  }
}

It is clumsy and untested.

Describe the solution you'd like

Describe alternatives you've considered

None.

Additional context

None.

richelbilderbeek commented 5 years ago

Well tried, but does not fix the code coverage.

Someone can try again :+1: