dev foxhunt
This commit is contained in:
parent
187a7e14c8
commit
8987fc34b5
|
|
@ -88,6 +88,19 @@ namespace Koogle.Application.Games.FoxHunt
|
||||||
// fox has been caught
|
// fox has been caught
|
||||||
isLastHunter = true;
|
isLastHunter = true;
|
||||||
playerStates[foxId].FoxCaught = 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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -122,6 +135,7 @@ namespace Koogle.Application.Games.FoxHunt
|
||||||
// Update model
|
// Update model
|
||||||
model = model with
|
model = model with
|
||||||
{
|
{
|
||||||
|
PlayerStates = playerStates,
|
||||||
FoxIndex = model.FoxIndex,
|
FoxIndex = model.FoxIndex,
|
||||||
FoxTurn = model.FoxTurn,
|
FoxTurn = model.FoxTurn,
|
||||||
FoxTurnsRemaining = model.FoxTurnsRemaining,
|
FoxTurnsRemaining = model.FoxTurnsRemaining,
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
{
|
{
|
||||||
<MudPaper Class="pa-3" Elevation="0" Style="background-color: var(--mud-palette-background-grey);">
|
<MudPaper Class="pa-3" Elevation="0" Style="background-color: var(--mud-palette-background-grey);">
|
||||||
<MudText Typo="Typo.body2" Color="Color.Secondary">
|
<MudText Typo="Typo.body2" Color="Color.Secondary">
|
||||||
Überlebe als als Fuchs, mit dem größten Vorsprung!
|
Überlebe als Fuchs, mit dem größten Vorsprung!
|
||||||
</MudText>
|
</MudText>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue