< Summary

Information
Class: GridForge.Grids.GridCommittedChange
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridCommittedChange.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 53
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%
.ctor(...)100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridCommittedChange.cs

#LineLine coverage
 1//=======================================================================
 2// GridCommittedChange.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 GridForge.Grids;
 9
 10
 11
 12internal readonly struct GridCommittedChange
 13{
 14    public readonly GridEventInfo GridEvent;
 15    public readonly GridExactChangeKind ExactKind;
 16    public readonly ObstacleEventInfo ObstacleEvent;
 17    public readonly ObstacleClearEventInfo ObstacleClearEvent;
 18    public readonly Voxel? TargetVoxel;
 19
 20    public GridCommittedChange(GridEventInfo gridEvent)
 21    {
 267522        GridEvent = gridEvent;
 267523        ExactKind = GridExactChangeKind.None;
 267524        ObstacleEvent = default;
 267525        ObstacleClearEvent = default;
 267526        TargetVoxel = null;
 267527    }
 28
 29    public GridCommittedChange(
 30        GridEventInfo gridEvent,
 31        GridExactChangeKind exactKind,
 32        ObstacleEventInfo obstacleEvent,
 33        Voxel targetVoxel)
 34    {
 111735        GridEvent = gridEvent;
 111736        ExactKind = exactKind;
 111737        ObstacleEvent = obstacleEvent;
 111738        ObstacleClearEvent = default;
 111739        TargetVoxel = targetVoxel;
 111740    }
 41
 42    public GridCommittedChange(
 43        GridEventInfo gridEvent,
 44        ObstacleClearEventInfo obstacleClearEvent,
 45        Voxel targetVoxel)
 46    {
 56747        GridEvent = gridEvent;
 56748        ExactKind = GridExactChangeKind.ObstaclesCleared;
 56749        ObstacleEvent = default;
 56750        ObstacleClearEvent = obstacleClearEvent;
 56751        TargetVoxel = targetVoxel;
 56752    }
 53}