From 8987fc34b5d9b94961a48c3dff2e25529411e012 Mon Sep 17 00:00:00 2001 From: beo3000 Date: Mon, 5 Jan 2026 15:27:51 +0100 Subject: [PATCH] dev foxhunt --- .../Games/FoxHunt/FoxHuntGameLogicService.cs | 14 ++++++++++++++ .../Components/Game/FoxHunt/FoxBoard.razor | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) 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! }