Difference between revisions of "AddEndOfTurnTiles"
(Created page with "The "AddEndOfTurnTiles" subroutine checks the number of tiles left at the end of a round in the game, and <syntaxhighlight lang="csharp"> private static void AddEndOfTurnTil...") |
|||
Line 5: | Line 5: | ||
{ | { | ||
int NoOfEndOfTurnTiles = 0; | int NoOfEndOfTurnTiles = 0; | ||
− | |||
− | |||
if (NewTileChoice == "1") | if (NewTileChoice == "1") | ||
{ | { |
Latest revision as of 12:18, 14 November 2017
The "AddEndOfTurnTiles" subroutine checks the number of tiles left at the end of a round in the game, and
private static void AddEndOfTurnTiles(ref QueueOfTiles TileQueue, ref string PlayerTiles, string NewTileChoice, string Choice)
{
int NoOfEndOfTurnTiles = 0;
if (NewTileChoice == "1")
{
NoOfEndOfTurnTiles = Choice.Length;
}
else if (NewTileChoice == "2")
{
NoOfEndOfTurnTiles = 3;
}
else
{
NoOfEndOfTurnTiles = Choice.Length + 3;
}
for (int Count = 0; Count < NoOfEndOfTurnTiles; Count++)
{
PlayerTiles = PlayerTiles + TileQueue.Remove();
TileQueue.Add();
}
}