Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C# by heartfire ( 8 years ago )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
namespace Hangman
{
class Program
{
static void Main(string[] args)
{
{
List<string> correctGuesses = new List<string>();
List<string> wrongGuesses = new List<string>();
var rdm = new Random();
string[] word = { "blue", "yellow", "purple"};
string wordField = word[rdm.Next(0, wort.Length)];
string wordToGuess= wordField;
int x = wortFeld.Length;
for (int i = 0; i < x; i++)
{
Console.Write("_");
}
wordToGuess = wordField;
Console.WriteLine("Input a character that you want to guess.");
string userInput = Console.ReadLine();
if (wordToGuess.Contains(userInput))
{
correctGuesses.Add(userInput);
}
else
{
wrongGuesses.Add(userInput);
}
}
}
Revise this Paste
Children: 89978