diff --git a/GameHandler.UnitTests/DeathGame/DeathGameHandlerTests.cs b/GameHandler.UnitTests/DeathGame/DeathGameHandlerTests.cs index 78fadba..4a5f9ed 100644 --- a/GameHandler.UnitTests/DeathGame/DeathGameHandlerTests.cs +++ b/GameHandler.UnitTests/DeathGame/DeathGameHandlerTests.cs @@ -82,7 +82,17 @@ namespace GameHandler.UnitTests.DeathGame { var gm = _gh.InitGameModel(_players, _settings); + var newGm = _gh.CalcNextModel(gm, 2, false, true); + Assert.That(newGm.Coffins.Last().XCount, Is.EqualTo(1)); + } + [Test] + public void AfterThrowIntoAllPins_SomeFirstPlayerHasAnX() + { + var gm = _gh.InitGameModel(_players, _settings); + + var newGm = _gh.CalcNextModel(gm, 2, true, true); + Assert.That(newGm.Coffins.Last().XCount, Is.EqualTo(1)); } [Test] diff --git a/GameHandler/DeathGame/DeathGameHandler.cs b/GameHandler/DeathGame/DeathGameHandler.cs index 42533fa..cb569df 100644 --- a/GameHandler/DeathGame/DeathGameHandler.cs +++ b/GameHandler/DeathGame/DeathGameHandler.cs @@ -107,6 +107,10 @@ namespace GameHandler.DeathGame lineCount++; } + if (incX) + { + xCount++; + } currentUpdated = current with { LineCount = lineCount, XCount = xCount }; if (lineCount > gm.deathGameSettings.MaxCoffinSize)