Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i <= answer.Length; i++) //answer is a string "theword"
- {
- if (answer[i] == passMe) //passMe is "A" for example
- {
- hiddenWord = hiddenWord.Remove(i, 1);
- hiddenWord = hiddenWord.Insert(i, passMe);
- }
- }
- if (answer[i] == passMe[0])
- for (int i = 0; i < answer.Length; i++)
- for (int i = 0; i <= answer.Length; i++) //answer is a string "theword"
- {
- if (answer[i] == passMe[0]) //passMe is "A" for example
- {
- hiddenWord = hiddenWord.Remove(i, 1);
- hiddenWord = hiddenWord.Insert(i, passMe);
- }
- }
- hiddenWord = new String(hiddenWord.Zip(answer, (a, b) => b==passMe[0] ? b : a).ToArray());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement