private String word, rWord, uWord;
private static HereWords _instance = null;
private static object chekLock = new object();
public static HereWords Instance
_instance = new HereWords();
public void setWord1(String word) {
public String getWord1() {
public void setRumbleWord1(String rWord)
public String getRumbleWord1()
public void setUserWord1(String rWord)
string upperString = rWord.ToUpper();
this.uWord += upperString;
public String getUserWord1()
public void setTry(int t)
public static void Main(string[] args)
HereWords hereWords = HereWords.Instance;
Console.WriteLine("Guess the word!");
Console.WriteLine("It can be found at a school! You have 3 tries!");
hereWords.setWord1(theWord);
String word = WordGuess(theWord);
if (hereWords.getUserWord1() == hereWords.getWord1())
Console.WriteLine(hereWords.getUserWord1() + " is the word! You are correct!");
Console.WriteLine("You have Gotten the word! Congrats");
Console.WriteLine("You have lost...");
public static string WordGuess(String s) {
HereWords hereWords = HereWords.Instance;
String rumble = Shuffle(s);
hereWords.setRumbleWord1(rumble);
String rWords = hereWords.getRumbleWord1();
StringBuilder random = new StringBuilder(rWords);
String words = hereWords.getWord1();
StringBuilder mWord = new StringBuilder(words);
int rWordL = rWords.Length;
for (int loop = 0; loop < rWordL; loop++)
Console.WriteLine("The rumbled word: " + hereWords.getRumbleWord1());
Console.WriteLine("Your letters: " + hereWords.getUserWord1());
Console.WriteLine("Guess the the " + (letter) + " letter. You have " + hereWords.getTry() + " lives left.");
String uWords = Console.ReadLine();
String uWords1 = uWords.ToUpper();
StringBuilder sb = new StringBuilder(uWords1);
char mWArr = mWord[loop];
hereWords.setUserWord1(Char.ToString(sb[0]));
Console.WriteLine("Try again");
return hereWords.getUserWord1(); ;
public static string Shuffle(string str)
char[] array = str.ToCharArray();
Random rng = new Random();
return new string(array);