[Add] Master Category
This commit is contained in:
@@ -5,9 +5,6 @@ namespace YachtDice.UI.Presentation
|
||||
{
|
||||
public sealed class ScoreSummaryService : IScoreSummaryService
|
||||
{
|
||||
private const int UpperBonusThreshold = 63;
|
||||
private const int UpperBonusValue = 35;
|
||||
|
||||
private readonly ScoringSystem _scoringSystem;
|
||||
private readonly CategoryCatalog _categoryCatalog;
|
||||
|
||||
@@ -20,11 +17,11 @@ namespace YachtDice.UI.Presentation
|
||||
public ScoreSummary Calculate()
|
||||
{
|
||||
var upperSum = CalculateUpperSum();
|
||||
var hasUpperBonus = upperSum >= UpperBonusThreshold;
|
||||
var hasUpperBonus = upperSum >= _categoryCatalog.UpperBonusThreshold;
|
||||
|
||||
var total = _scoringSystem.TotalScore;
|
||||
if (hasUpperBonus)
|
||||
total += UpperBonusValue;
|
||||
total += _categoryCatalog.UpperBonusValue;
|
||||
|
||||
return new ScoreSummary(total, upperSum, hasUpperBonus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user