QuestionQuestion

Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to replicate a hidden word.
Store at least eight words in an array, and randomly select one to be the hidden word.

Initially, display the hidden word using asterisks to represent each letter.   Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word.   
If the user guesses a letter that is not in the hidden word, display an appropriate message.
If the user guesses a letter that appears multiple times in the hidden word, make sure that each correct letter is placed.

Hint: If you create the GUI version of the game, you might want to include a Start button that selects the random word and performs other startup tasks before you reveal the game interface. After the startup tasks are complete, you can remove the Start button from the form.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Averages
{
    public partial class Averages : Form
    {
       double [] newArray;
       public Averages()
       {
            InitializeComponent();
            // init the array
            newArray = new double[0] ;
       }

       private void buttonAdd_Click(object sender, EventArgs e)
       {
            double number;
            int index;...
$40.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Computer Science - Other Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats