< Summary

Information
Class: Trailblazer.Navigation.TrailblazerNavigationService
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Navigation/TrailblazerNavigationService.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 35
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%
CreateNavigatorId()100%11100%
Reset()100%11100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Navigation/TrailblazerNavigationService.cs

#LineLine coverage
 1//=======================================================================
 2// TrailblazerNavigationService.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
 8using System;
 9using Trailblazer.Navigation.MovementGroups;
 10
 11namespace Trailblazer.Navigation;
 12
 13/// <summary>
 14/// Context-owned navigation coordination state for navigators, steering, movement groups, and ids.
 15/// </summary>
 16internal sealed class TrailblazerNavigationService
 17{
 98918    internal TrailblazerNavigationService(TrailblazerWorldContext context)
 19    {
 98920        MovementGroups = new MovementGroupCoordinatorState(context);
 98921        NavigatorIds = new NavigatorGlobalIdAllocatorState();
 98922    }
 23
 24    internal MovementGroupCoordinatorState MovementGroups { get; }
 25
 26    internal NavigatorGlobalIdAllocatorState NavigatorIds { get; }
 27
 26528    internal Guid CreateNavigatorId() => NavigatorIds.Create();
 29
 30    internal void Reset()
 31    {
 2232        MovementGroups.Reset();
 2233        NavigatorIds.Reset();
 2234    }
 35}