github
1314 of 3642 branches covered (36.08%)
Branch coverage included in aggregate %.
17 of 43 new or added lines in 4 files covered. (39.53%)
3138 existing lines in 160 files now uncovered.4965 of 12149 relevant lines covered (40.87%)
5600.46 hits per line
1 |
using Zilon.Core.CommonServices.Dices; |
|
2 |
using Zilon.Core.Persons.Survival;
|
|
3 |
|
|
4 |
namespace Zilon.Core.Persons
|
|
5 |
{ |
|
6 |
public class SurvivalRandomSource : ISurvivalRandomSource |
|
7 |
{ |
|
8 |
private readonly IDice _dice;
|
|
9 |
|
|
UNCOV
10
|
public SurvivalRandomSource(IDice dice)
|
× |
UNCOV
11
|
{ |
× |
UNCOV
12
|
_dice = dice; |
× |
UNCOV
13
|
} |
× |
14 |
|
|
15 |
public int RollMaxHazardDamage() |
|
16 |
{ |
× |
17 |
return _dice.Roll(6); |
× |
18 |
} |
× |
19 |
|
|
20 |
public int RollSurvival(SurvivalStat stat) |
|
UNCOV
21
|
{ |
× |
UNCOV
22
|
return _dice.Roll(6); |
× |
UNCOV
23
|
} |
× |
24 |
} |
|
25 |
} |