diff --git a/src/Koogle.Application/Games/FoxHunt/FoxHuntGameLogicService.cs b/src/Koogle.Application/Games/FoxHunt/FoxHuntGameLogicService.cs index da10773..ba00644 100644 --- a/src/Koogle.Application/Games/FoxHunt/FoxHuntGameLogicService.cs +++ b/src/Koogle.Application/Games/FoxHunt/FoxHuntGameLogicService.cs @@ -88,6 +88,19 @@ namespace Koogle.Application.Games.FoxHunt // fox has been caught isLastHunter = true; playerStates[foxId].FoxCaught = true; + + + // Calculate penalty (point difference the hunters achieved) + int pointDifference = playerStates[foxId].PinCountHunters - playerStates[foxId].PinCountFox; + if (pointDifference > 0) + { + triggers.Add(new TriggerEvent + { + TriggerType = ExpenseTriggerType.ExpensePoint.ToString(), + PersonId = foxId, + Multiplier = pointDifference + }); + } } else { @@ -122,6 +135,7 @@ namespace Koogle.Application.Games.FoxHunt // Update model model = model with { + PlayerStates = playerStates, FoxIndex = model.FoxIndex, FoxTurn = model.FoxTurn, FoxTurnsRemaining = model.FoxTurnsRemaining, diff --git a/src/Koogle.Web/Components/Game/FoxHunt/FoxBoard.razor b/src/Koogle.Web/Components/Game/FoxHunt/FoxBoard.razor index 735d258..5e74fdd 100644 --- a/src/Koogle.Web/Components/Game/FoxHunt/FoxBoard.razor +++ b/src/Koogle.Web/Components/Game/FoxHunt/FoxBoard.razor @@ -164,7 +164,7 @@ { - Überlebe als als Fuchs, mit dem größten Vorsprung! + Überlebe als Fuchs, mit dem größten Vorsprung! }