Switch players after move, can only roll dice once, and other improvements
This commit is contained in:
@ -182,4 +182,20 @@ public class ActionServiceTests
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FindNextPlayer()
|
||||
|
||||
[Test]
|
||||
public void FindNexPlayer_OnePlayer()
|
||||
{
|
||||
Assert.Fail();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FindNexPlayer_TwoPlayers()
|
||||
{
|
||||
Assert.Fail();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -196,4 +196,23 @@ public class GameGroupTests
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsGameStarted()
|
||||
|
||||
[Test]
|
||||
public void IsGameStarted_AllWaiting()
|
||||
{
|
||||
AddFullParty();
|
||||
Assert.That(_gameGroup.IsGameStarted, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsGameStarted_AllInGame()
|
||||
{
|
||||
AddFullParty();
|
||||
_gameGroup.Players.ForEach(player => player.State = State.InGame);
|
||||
Assert.That(_gameGroup.IsGameStarted, Is.True);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class WebSocketServiceTests
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(group.Players, Has.Count.EqualTo(1));
|
||||
Assert.That(group.RandomPlayer, Is.EqualTo(player));
|
||||
Assert.That(group.NextPlayer, Is.EqualTo(player));
|
||||
Assert.That(_service.Games, Has.Count.EqualTo(1));
|
||||
});
|
||||
}
|
||||
@ -174,7 +174,7 @@ public class WebSocketServiceTests
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(group.Players, Has.Count.EqualTo(1));
|
||||
Assert.That(group.RandomPlayer, Is.EqualTo(player5));
|
||||
Assert.That(group.NextPlayer, Is.EqualTo(player5));
|
||||
Assert.That(_service.Games, Has.Count.EqualTo(2));
|
||||
Assert.That(_service.Games.First(), Has.Count.EqualTo(Rules.MaxPlayers));
|
||||
});
|
||||
|
Reference in New Issue
Block a user