< Summary

Class:LaunchPlan
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Algorithms/Planning/LaunchPlanner.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:43
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:6
Method coverage:0% (0 of 6)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
LaunchPlan()0%2100%
LaunchPlan()0%2100%
LaunchPlan(...)0%2100%

File(s)

/github/workspace/Assets/Scripts/Algorithms/Planning/LaunchPlanner.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// Launch planner output.
 4public class LaunchPlan {
 5  // No-launch launch plan.
 06  public static LaunchPlan NoLaunch = new LaunchPlan();
 7
 8  // Whether the interceptor should be launched.
 09  public bool ShouldLaunch { get; }
 10
 11  // Launch angle in degrees measured from the horizon.
 012  public float LaunchAngle { get; }
 13
 14  // Intercept position.
 015  public Vector3 InterceptPosition { get; }
 16
 017  public LaunchPlan() {
 018    ShouldLaunch = false;
 019  }
 020  public LaunchPlan(float launchAngle, Vector3 interceptPosition, bool shouldLaunch = true) {
 021    LaunchAngle = launchAngle;
 022    InterceptPosition = interceptPosition;
 023    ShouldLaunch = shouldLaunch;
 024  }
 25}
 26
 27// The launch planner class is an interface for planning when and where to launch an interceptor to
 28// intercept a target.
 29public abstract class ILaunchPlanner {
 30  // Launch angle planner.
 31  protected ILaunchAnglePlanner _launchAnglePlanner;
 32
 33  // Agent trajectory predictor.
 34  protected IPredictor _predictor;
 35
 36  public ILaunchPlanner(ILaunchAnglePlanner launchAnglePlanner, IPredictor predictor) {
 37    _launchAnglePlanner = launchAnglePlanner;
 38    _predictor = predictor;
 39  }
 40
 41  // Plan the launch.
 42  public abstract LaunchPlan Plan();
 43}