< Summary

Class:FpMineSweeper.Prelude
Assembly:FpMineSweeper
File(s):/home/runner/work/KATA-MineSweeper-20210502b/KATA-MineSweeper-20210502b/src/FpMineSweeper/Prelude.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:20
Line coverage:100% (9 of 9)
Covered branches:7
Total branches:10
Branch coverage:70% (7 of 10)
Tag:52_817390446

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
str(...)72.73%7.3362466.67%
cell(...)0%110100%
cell(...)0%110100%
mineField(...)0%110100%

File(s)

/home/runner/work/KATA-MineSweeper-20210502b/KATA-MineSweeper-20210502b/src/FpMineSweeper/Prelude.cs

#LineLine coverage
 1namespace FpMineSweeper
 2{
 3    public static partial class Prelude
 4    {
 35        public static string str(Cell cell) => cell switch
 36        {
 47            { IsCovered: true } => ".",
 48            { IsBomb: true } => "*",
 49            var x => x.NearBombsCount.ToString()
 310        };
 11
 12        public static Cell cell(bool isBomb, int nearBombsCount = 0, bool isCovered = true) =>
 613            new Cell(0, 0, isBomb, nearBombsCount, isCovered);
 14        public static Cell cell((int X, int Y) pos, bool isBomb, int nearBombsCount = 0, bool isCovered = true) =>
 1815            new Cell(pos.X, pos.Y, isBomb, nearBombsCount, isCovered);
 16
 17        public static MineFieldInit mineField(int width, int height) =>
 318            new MineFieldInit(width, height);
 19    }
 20}