ajout des marker et des socles aux joueurs au debut de la partie
All checks were successful
check main state / build (9.0.x) (push) Successful in 1m26s
All checks were successful
check main state / build (9.0.x) (push) Successful in 1m26s
This commit was merged in pull request #27.
This commit is contained in:
@@ -17,7 +17,7 @@ public class PrepareMatchCommandTest
|
||||
}
|
||||
|
||||
[Fact]
|
||||
void SimpleInit()
|
||||
void SimpleInit5Players()
|
||||
{
|
||||
NewMatchCommand command = new NewMatchCommand(_repo);
|
||||
NewMatchResult result = command.Execute();
|
||||
@@ -29,12 +29,65 @@ public class PrepareMatchCommandTest
|
||||
Assert.True(resultPrep.Success);
|
||||
Assert.NotNull(resultPrep?.Match);
|
||||
|
||||
Player? p1 = resultPrep.Match.GetPlayer(0);
|
||||
Assert.NotNull(p1);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Player? p = resultPrep.Match.GetPlayer(i);
|
||||
Assert.NotNull(p);
|
||||
|
||||
Assert.Equal(5, p1.NbVisibleTribalTokenCount);
|
||||
Assert.Equal(0, p1.NbHiddenTribalTokenCount);
|
||||
Assert.Equal(1, p1.NbUrnTribalTokenCount);
|
||||
Assert.Equal(2, p.NbVisibleTribalTokenCount);
|
||||
Assert.Equal(0, p.NbHiddenTribalTokenCount);
|
||||
Assert.Equal(4, p.NbUrnTribalTokenCount);
|
||||
Assert.Equal(5, p.NbVisibleBase);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
void SimpleInit4Players()
|
||||
{
|
||||
NewMatchCommand command = new NewMatchCommand(_repo);
|
||||
NewMatchResult result = command.Execute();
|
||||
Match? m = result.Match;
|
||||
Assert.NotNull(m);
|
||||
|
||||
PrepareMatchCommand prepCommand = new PrepareMatchCommand() { InputMatch = m, PlayerIDs = new List<int>() { 12, 15, 5, 14 } };
|
||||
var resultPrep = prepCommand.Execute();
|
||||
Assert.True(resultPrep.Success);
|
||||
Assert.NotNull(resultPrep?.Match);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Player? p = resultPrep.Match.GetPlayer(i);
|
||||
Assert.NotNull(p);
|
||||
|
||||
Assert.Equal(2, p.NbVisibleTribalTokenCount);
|
||||
Assert.Equal(0, p.NbHiddenTribalTokenCount);
|
||||
Assert.Equal(4, p.NbUrnTribalTokenCount);
|
||||
Assert.Equal(6, p.NbVisibleBase);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
void SimpleInit3Players()
|
||||
{
|
||||
NewMatchCommand command = new NewMatchCommand(_repo);
|
||||
NewMatchResult result = command.Execute();
|
||||
Match? m = result.Match;
|
||||
Assert.NotNull(m);
|
||||
|
||||
PrepareMatchCommand prepCommand = new PrepareMatchCommand() { InputMatch = m, PlayerIDs = new List<int>() { 12, 15, 5 } };
|
||||
var resultPrep = prepCommand.Execute();
|
||||
Assert.True(resultPrep.Success);
|
||||
Assert.NotNull(resultPrep?.Match);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Player? p = resultPrep.Match.GetPlayer(i);
|
||||
Assert.NotNull(p);
|
||||
|
||||
Assert.Equal(2, p.NbVisibleTribalTokenCount);
|
||||
Assert.Equal(0, p.NbHiddenTribalTokenCount);
|
||||
Assert.Equal(4, p.NbUrnTribalTokenCount);
|
||||
Assert.Equal(7, p.NbVisibleBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user