Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1.     public partial class MainForm : Form
  2.     {
  3.         public const int MaxAllowedGuessedValue = 100;
  4.         public const int QuantityOfAttemptsToGuess = 6;
  5.         public readonly string EmptyField = "";
  6.         IGame Game;
  7.  
  8.         internal void AddBaseTextToTextFields(string quantityAttemptMessage, string askValueFromUserMessage)
  9.         {
  10.             SetTextToField(quantityAttemptMessage, QuantityOfAttemptsMessage);
  11.             SetTextToField(askValueFromUserMessage, LabelAnswerText);
  12.         }
  13.  
  14.         internal void AddAnswerToTextField(string answer)
  15.         {
  16.             SetTextToField(answer, LabelAnswerText);
  17.         }
  18.  
  19.         private void SetTextToField(string text, Label label)
  20.         {
  21.             label.Text = text;
  22.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement