< Summary

Information
Class: Trailblazer.Pathing.ParsedTraversalCell
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Authoring/ParsedTraversalCell.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 32
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_CanGenerateTransition()100%11100%
get_TransitionMedia()100%22100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Authoring/ParsedTraversalCell.cs

#LineLine coverage
 1namespace Trailblazer.Pathing;
 2
 3/// <summary>
 4/// Represents a single cell parsed from the source map of a <see cref="TraversalAuthoringMap"/>,
 5/// including its interpreted legend entry and whether it was explicitly marked for transition generation.
 6/// This is an internal struct used during the build process of a traversal chart.
 7/// </summary>
 8internal readonly struct ParsedTraversalCell
 9{
 10    public ParsedTraversalCell(TraversalLegendEntry entry, bool hasTransitionMarker, int pathCostModifier = 0)
 11    {
 11912        Entry = entry;
 11913        HasTransitionMarker = hasTransitionMarker;
 11914        PathCostModifier = pathCostModifier;
 11915    }
 16
 17    public TraversalLegendEntry Entry { get; }
 18
 19    public bool HasTransitionMarker { get; }
 20
 21    /// <summary>
 22    /// An inline path cost modifier parsed from the token suffix (e.g. <c>S_60</c> yields 60).
 23    /// Zero when no suffix was present or when the entry is a skip cell.
 24    /// </summary>
 25    public int PathCostModifier { get; }
 26
 4727    public bool CanGenerateTransition => TransitionMedia != TraversalMedia.None;
 28
 8729    public TraversalMedia TransitionMedia => HasTransitionMarker
 8730        ? Entry.TransitionMedia
 8731        : TraversalMedia.None;
 32}