Difference between revisions of "When a word is valid, display the word and the score for the word"
(Created page with "In the subroutine HaveTurn: if (ValidWord) { ValidWord = CheckWordIsValidBinary(Choice, AllowedWords); if...") |
|||
Line 1: | Line 1: | ||
In the subroutine HaveTurn: | In the subroutine HaveTurn: | ||
+ | <syntaxhighlight lang=Csharp> | ||
if (ValidWord) | if (ValidWord) | ||
{ | { | ||
Line 12: | Line 13: | ||
UpdateAfterAllowedWord(Choice, ref PlayerTiles, ref PlayerScore, ref PlayerTilesPlayed, TileDictionary, AllowedWords); | UpdateAfterAllowedWord(Choice, ref PlayerTiles, ref PlayerScore, ref PlayerTilesPlayed, TileDictionary, AllowedWords); | ||
NewTileChoice = GetNewTileChoice(); | NewTileChoice = GetNewTileChoice(); | ||
+ | </syntaxhighlight> | ||
− | The line Console.WriteLine(Choice + ": " + GetScoreForWord(Choice, TileDictionary) + " points"); will display the word and its score. | + | The line |
+ | <syntaxhighlight lang=Csharp> | ||
+ | Console.WriteLine(Choice + ": " + GetScoreForWord(Choice, TileDictionary) + " points"); | ||
+ | </syntaxhighlight> | ||
+ | will display the word and its score. |
Revision as of 09:51, 14 May 2018
In the subroutine HaveTurn:
if (ValidWord)
{
ValidWord = CheckWordIsValidBinary(Choice, AllowedWords);
if (ValidWord)
{
Console.WriteLine();
Console.WriteLine("Valid word");
Console.WriteLine(Choice + ": " + GetScoreForWord(Choice, TileDictionary) + " points");
Console.WriteLine();
UpdateAfterAllowedWord(Choice, ref PlayerTiles, ref PlayerScore, ref PlayerTilesPlayed, TileDictionary, AllowedWords);
NewTileChoice = GetNewTileChoice();
The line
Console.WriteLine(Choice + ": " + GetScoreForWord(Choice, TileDictionary) + " points");
will display the word and its score.