|
|
|
@ -4,6 +4,7 @@ using static System.Console;
|
|
|
|
|
static Game InitializerGame()
|
|
|
|
|
{
|
|
|
|
|
OutputEncoding = System.Text.Encoding.UTF8;
|
|
|
|
|
|
|
|
|
|
List<Player> Players = new List<Player>();
|
|
|
|
|
|
|
|
|
|
WriteLine("Enter number of player play : ");
|
|
|
|
@ -23,7 +24,7 @@ static Game InitializerGame()
|
|
|
|
|
{
|
|
|
|
|
WriteLine("Enter name of player " + (i + 1) + " : \n");
|
|
|
|
|
|
|
|
|
|
String name = ReadLine();
|
|
|
|
|
String? name = ReadLine();
|
|
|
|
|
|
|
|
|
|
bool nameInvalid = string.IsNullOrWhiteSpace(name);
|
|
|
|
|
|
|
|
|
@ -68,21 +69,7 @@ static void NextPlayer(Game game)
|
|
|
|
|
game.SetNextPlayer(posPlayerPlay, posPlayerNextPlay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void TilsBagPlayer(Game game)
|
|
|
|
|
{
|
|
|
|
|
List<Tile> listTile = game.Bag;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < game.GetNbPlayers; i++)
|
|
|
|
|
{
|
|
|
|
|
for (int j = 0; j < 6; j++)
|
|
|
|
|
{
|
|
|
|
|
Tile tile = listTile[j];
|
|
|
|
|
game.AddTileInBagOfPlayer(i, tile);
|
|
|
|
|
game.RemoveTileInBagGame(tile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void testJeremy()
|
|
|
|
@ -95,7 +82,7 @@ static void testJeremy()
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
|
|
|
|
|
TilsBagPlayer(game);
|
|
|
|
|
game.TilsBagPlayer();
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < game.GetNbPlayers; i++)
|
|
|
|
|
{
|
|
|
|
|