< Summary

Information
Class: Trailblazer.Pathing.NavigationPhysicalPage
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Graph/NavigationPhysicalPage.cs
Line coverage
100%
Covered lines: 17
Uncovered lines: 0
Coverable lines: 17
Total lines: 43
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
.ctor(...)100%11100%
Clone(...)100%11100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Graph/NavigationPhysicalPage.cs

#LineLine coverage
 1//=======================================================================
 2// NavigationPhysicalPage.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8namespace Trailblazer.Pathing;
 9
 10internal sealed class NavigationPhysicalPage
 11{
 12    internal const int SlotCount = 64;
 13
 172114    internal NavigationPhysicalPage(int pageIndex, long version = 0)
 15    {
 172116        PageIndex = pageIndex;
 172117        Version = version;
 172118        IsPresent = new bool[SlotCount];
 172119        ObstacleCounts = new byte[SlotCount];
 172120    }
 21
 28722    private NavigationPhysicalPage(int pageIndex, long version, bool[] isPresent, byte[] obstacleCounts)
 23    {
 28724        PageIndex = pageIndex;
 28725        Version = version;
 28726        IsPresent = isPresent;
 28727        ObstacleCounts = obstacleCounts;
 28728    }
 29
 30    internal int PageIndex { get; }
 31
 32    internal long Version { get; }
 33
 34    internal bool[] IsPresent { get; }
 35
 36    internal byte[] ObstacleCounts { get; }
 37
 28738    internal NavigationPhysicalPage Clone(long version) => new(
 28739        PageIndex,
 28740        version,
 28741        (bool[])IsPresent.Clone(),
 28742        (byte[])ObstacleCounts.Clone());
 43}