Function get_transition_directions

  • Gets the directions between the current direction and a desired/target direction. Example of transition between left and right: left -> up left -> up -> up right -> right.

    Parameters

    • current_direction: directions

      Current direction value

    • desired_direction: directions

      Desired/Target direction value

    Returns directions

    The direction value to apply