test_old_branch
Jérémy Mouyon 11 months ago
parent 2e3d7299ef
commit 24db8beb1b

@ -160,7 +160,7 @@ namespace QwirkleClassLibrary
{ {
foreach (var p in players) foreach (var p in players)
{ {
for (int j = 0; j < 1; j++) // 6 for (int j = 0; j < 6; j++)
{ {
int val = RandomNumberGenerator.GetInt32(0, bag.TilesBag.Count); int val = RandomNumberGenerator.GetInt32(0, bag.TilesBag.Count);

@ -14,27 +14,22 @@ namespace QwirkleClassLibrary
public TileBag(int nbSet) public TileBag(int nbSet)
{ {
/* if (nbSet < 0 || nbSet > 3) if (nbSet < 0 || nbSet > 3)
{ {
throw new ArgumentException(nbSet.ToString()); 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 Tile(s, c);
tiles.Add(t);
}
}
}*/
Tile t1 = new Tile(Shape.Square, Color.Red); for (int i = 0; i < nbSet; i++)
tiles.Add(t1); {
Tile t2 = new Tile(Shape.Star, Color.Yellow); foreach (Shape s in Enum.GetValues(typeof(Shape)))
tiles.Add(t2); {
foreach (Color c in Enum.GetValues(typeof(Color)))
{
Tile t = new Tile(s, c);
tiles.Add(t);
}
}
}
TilesBag = tiles.AsReadOnly(); TilesBag = tiles.AsReadOnly();
} }

Loading…
Cancel
Save