code: private Force getMovementForce(double x, double y, double dx, double dy)
      {
          double sx = 0.0;
          double sy = 0.0;
  
          // Horizontal speed
          if (dx - x < 0)
          {
              sx = -getSpeedX();
          }
          else if (dx - x > 0)
          {
              sx = getSpeedX();
          }
          // Vertical speed
          if (dy - y < 0)
          {
              sy = -getSpeedX();
          }
          else if (dy - y > 0)
          {
              sy = getSpeedX();
          }
          // Diagonal speed
          if (Double.compare(sx, 0) != 0 && Double.compare(sy, 0) != 0)
          {
              sx *= PathfindableModel.DIAGONAL_SPEED;
              sy *= PathfindableModel.DIAGONAL_SPEED;
          }
  
          return new Force(sx, sy);
      }
docs: Get the movement force depending of the current location and the destination location.
  
  @param x The current horizontal location.
  @param y The current vertical location.
  @param dx The destination horizontal location.
  @param dy The destination vertical location.
  @return The movement force pointing to the destination.