|
|
|
@ -58,12 +58,46 @@ static void NextPlayer(Game game)
|
|
|
|
|
{
|
|
|
|
|
int posPlayerPlay = game.PositionPlayerPlay();
|
|
|
|
|
|
|
|
|
|
int posPlayerNextPlay = (game.PositionPlayerPlay() + 1);
|
|
|
|
|
int posPlayerNextPlay = game.PositionPlayerPlay() + 1;
|
|
|
|
|
|
|
|
|
|
if (posPlayerNextPlay >= game.GetNbPlayers)
|
|
|
|
|
{
|
|
|
|
|
posPlayerNextPlay = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Game game = InitializerGame();
|
|
|
|
|
Write("\n -------------------------------------------------------- \n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
NextPlayer(game);
|
|
|
|
|
|
|
|
|
|
TilsBagPlayer(game);
|
|
|
|
|
|
|
|
|
|
game.ShowTileOfPlayer(0);
|
|
|
|
|
game.ShowTileOfPlayer(1);
|
|
|
|
|
game.ShowTileOfPlayer(2);
|
|
|
|
|
game.ShowTileOfPlayer(3);
|
|
|
|
|