HangMan Console Game Help
SPONSORED LINKS
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace HangMan
{
class Program
{
static void Main(string[] args)
{
string sName;
string sInput;
//declaring the word array
string[] sWordBank = new string[5];
sWordBank[0] = "Computer";
sWordBank[1] = "information";
sWordBank[2] = "Educate";
sWordBank[3] = "Learning";
sWordBank[4] = "Business";
//displaying the game display output on screen
Console.WriteLine(" HangMan Console");
Console.WriteLine(" Application ");
Console.WriteLine(" Game ");
Console.WriteLine(" ________________ ");
Console.WriteLine(" | | ");
Console.WriteLine(" | ( ) ");
Console.WriteLine(" | /|\ ");
Console.WriteLine(" | | ");
Console.WriteLine(" | /|\ ");
Console.WriteLine(" | ");
Console.WriteLine(" | ");
Console.WriteLine(" _|_______ ");
//Ask user to Enter Name
Console.Write("Enter your Name: ");
sName = Convert.ToString(Console.ReadLine());
Console.Clear();
//displaying user greeting message
Console.WriteLine(sName + ", Lets See you go");
Console.WriteLine(" ************************* ");
Console.WriteLine(" * Hangman * ");
Console.WriteLine(" * Survival * ");
Console.WriteLine(" * Quest * ");
Console.WriteLine(" ************************* ");
Console.WriteLine();
//draw the hang structure
Console.WriteLine(" ______________ ");
Console.WriteLine(" |/ ");
Console.WriteLine(" | ");
Console.WriteLine(" | ");
Console.WriteLine(" | ");
Console.WriteLine(" | ");
Console.WriteLine(" | ");
Console.WriteLine(" _|_______ ");
//declare the word list display/output condition
if (sWordBank[0].Length == 7)
{
Console.WriteLine(" The word is : _ _ _ _ _ _ _ ");
}
else if (sWordBank[1].Length == 11)
{
Console.WriteLine(" The word is : _ _ _ _ _ _ _ _ _ _ _ ");
}
else if (sWordBank[2].Length == 7)
{
Console.WriteLine(" The word is : _ _ _ _ _ _ _ ");
}
else if (sWordBank[3].Length ==
{
Console.WriteLine(" The word is : _ _ _ _ _ _ _ _ ");
}
else if (sWordBank[4].Length ==
{
Console.WriteLine(" The word is : _ _ _ _ _ _ _ _ ");
}
Console.WriteLine();
Console.WriteLine(" ***Enter a new letter***");
Console.WriteLine();
Console.WriteLine("What Is Your Guess? ");
sInput = Convert.ToString(Console.ReadLine());
Console.ReadKey();
}
}
}
—-the next stage is for me to decalare a hanging state(miss) function to start hanging parts of the man if a character is missed .I do not know how to plot the cordinates for that.. i have tried all i could for almost 5days and i couldn’t….
I bet i suck in programming, but i despirately want to learn programming by all cost if i am to be a good Network Computing professional.
***** i know i have to use sr streamReaderr instead to read in the word but i tried it is not working for me. your help how i can implement this counts too please
See original here:
HangMan Console Game Help