Difference between revisions of "DisplayTilesInHand"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "<syntaxhighlight lang="C#"> private static void DisplayTilesInHand(string PlayerTiles) { Console.WriteLine(); Console.WriteLine("Your current h...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
 +
 
private static void DisplayTilesInHand(string PlayerTiles)
 
private static void DisplayTilesInHand(string PlayerTiles)
 
         {
 
         {
Line 6: Line 7:
 
         }
 
         }
  
Choice = GetChoice();
 
                if (Choice == "1")
 
                {
 
                    DisplayTileValues(TileDictionary, AllowedWords);
 
                }
 
                else if (Choice == "4")
 
                {
 
                    TileQueue.Show();
 
                }
 
                else if (Choice == "7")
 
                {
 
                    DisplayTilesInHand(PlayerTiles);
 
                }
 
 
</syntaxhighlight>
 
</syntaxhighlight>
The method that displays the tile in a players hand takes the string PlayerTiles and Writes it in the program.
+
The method that displays the tiles in a players hand takes the string PlayerTiles and writes it to the console.
 
The player can do this at any time during their turn by pressing "7" on their turn.
 
The player can do this at any time during their turn by pressing "7" on their turn.

Latest revision as of 13:58, 14 November 2017

private static void DisplayTilesInHand(string PlayerTiles)
        {
            Console.WriteLine();
            Console.WriteLine("Your current hand:" + PlayerTiles);
        }

The method that displays the tiles in a players hand takes the string PlayerTiles and writes it to the console. The player can do this at any time during their turn by pressing "7" on their turn.