public class AUGLongShot {
  
  public static void main(String[] args) {

    double playerX = 100.0;
    double playerY = 200.0;
    double targetX = 150.0;
    double targetY = 250.0; 
    double shootingAccuracy = 0.8;
    double gunRange = 400.0; 
    

    double distanceToTarget = calculateDistance(playerX, playerY, targetX, targetY);
    
    if (distanceToTarget <= gunRange) {

      double angleToTarget = calculateAngle(playerX, playerY, targetX, targetY);
      
      
      if (Math.random() <= shootingAccuracy) {

        double adjustedAngle = adjustAngle(angleToTarget, distanceToTarget);
        
     
        shootTarget(adjustedAngle);
        System.out.println("Hit the target!");
      } else {
        System.out.println("Missed the target!");
      }
    } else {
      System.out.println("Target out of range!");
    }
  }
  
  private static double calculateDistance(double x1, double y1, double x2, double y2) {
    return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
  }
  

  private static double calculateAngle(double playerX, double playerY, double targetX, double targetY) {
  
    return Math.atan2(targetY - playerY, targetX - playerX);
  }
  

  private static double adjustAngle(double angle, double distance) {
    
    return angle;
  }
  

  private static void shootTarget(double angle) {
  
    System.out.println("Shooting at angle: " + Math.toDegrees(angle));
  }
  
}
