This commit is contained in:
Christian Kauer 2023-12-17 20:15:55 +01:00
parent 031e8eef79
commit e477f42f82
2 changed files with 14 additions and 0 deletions

View File

@ -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]

View File

@ -107,6 +107,10 @@ namespace GameHandler.DeathGame
lineCount++;
}
if (incX)
{
xCount++;
}
currentUpdated = current with { LineCount = lineCount, XCount = xCount };
if (lineCount > gm.deathGameSettings.MaxCoffinSize)