old_branch_before_remy
Jérémy Mouyon 11 months ago
parent 3678fc96f9
commit 6ae0bdde3f

File diff suppressed because one or more lines are too long

@ -272,7 +272,7 @@ namespace QwirkleClassLibrary.Games
{
foreach (var p in players)
{
for (int j = 0; j < 1; j++) // 6
for (int j = 0; j < 6; j++)
{
if (bag != null && p.Tiles.Count < 6)
{

@ -24,28 +24,22 @@ namespace QwirkleClassLibrary.Tiles
/// <exception cref="ArgumentException">Throw an exception if the number of copies is negative (impossible) or superior to 3 (contradiction with the rules).</exception>
public TileBag(int nbSet)
{
/* if (nbSet < 0 || nbSet > 3)
{
throw new ArgumentException(nbSet.ToString());
}
for (int i = 0; i < nbSet; i++)
{
foreach (Shape s in Enum.GetValues(typeof(Shape)))
{
foreach (Color c in Enum.GetValues(typeof(Color)))
{
Tile t = new(s, c);
tiles.Add(t);
}
}
}*/
Tile t1 = new Tile(Shape.Club, Color.Yellow);
Tile t2 = new Tile(Shape.Round, Color.Orange);
if (nbSet < 0 || nbSet > 3)
{
throw new ArgumentException(nbSet.ToString());
}
tiles.Add(t1);
tiles.Add(t2);
for (int i = 0; i < nbSet; i++)
{
foreach (Shape s in Enum.GetValues(typeof(Shape)))
{
foreach (Color c in Enum.GetValues(typeof(Color)))
{
Tile t = new(s, c);
tiles.Add(t);
}
}
}
Init();
}

Loading…
Cancel
Save