This project should be done in C# using Visual Studio - Windows Forms.
This is a puzzle game of Wheel of Fortune. I need the puzzle to be \"Back to the Future\", and it
should not matter if the player guesses a upper or lowercase letter. If possible I could use step by
step instructions for creating the windows form and then entering the code to make the program
run. All the requirements for the game will be in pictures below.
The example uses the puzzle \"pulp fiction\", but again I need my puzzle to be \"Back to the
Future\". Thanks! You are to create the classic game of Wheel of Fortune. Your application
should consist of 3 players, underlines to represent letters in the puzzle, and the available letters.
The initial screen should look something like:
Solution
form1 designer:
namespace Wheel_Of_Fortune
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.labelLetters = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.textBox13 = new System.Windows.Forms.TextBox();
this.textBox14 = new System.Windows.Forms.TextBox();
this.textBox15 = new System.Windows.Forms.TextBox();
this.buttonSpin = new System.Windows.Forms.Button();
this.buttonSolve = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBoxP1 = new System.Windows.Forms.TextBox();
this.textBoxP2 = new System.Windows.Forms.TextBox();
this.textBoxP3 = new System.Windows.Forms.TextBox();
this.labelPrompt = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(68, 13.
This project should be done in C# using Visual Studio - Windows Form.pdf
1. This project should be done in C# using Visual Studio - Windows Forms.
This is a puzzle game of Wheel of Fortune. I need the puzzle to be "Back to the Future", and it
should not matter if the player guesses a upper or lowercase letter. If possible I could use step by
step instructions for creating the windows form and then entering the code to make the program
run. All the requirements for the game will be in pictures below.
The example uses the puzzle "pulp fiction", but again I need my puzzle to be "Back to the
Future". Thanks! You are to create the classic game of Wheel of Fortune. Your application
should consist of 3 players, underlines to represent letters in the puzzle, and the available letters.
The initial screen should look something like:
Solution
form1 designer:
namespace Wheel_Of_Fortune
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
2. /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.labelLetters = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.textBox13 = new System.Windows.Forms.TextBox();
this.textBox14 = new System.Windows.Forms.TextBox();
this.textBox15 = new System.Windows.Forms.TextBox();
this.buttonSpin = new System.Windows.Forms.Button();
this.buttonSolve = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBoxP1 = new System.Windows.Forms.TextBox();
this.textBoxP2 = new System.Windows.Forms.TextBox();
this.textBoxP3 = new System.Windows.Forms.TextBox();
this.labelPrompt = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
11. 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 Wheel_Of_Fortune
{
public partial class Form1 : Form
{
public string availableLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
public string puzzle = "backtothefuture";
Dictionary spinValues = new Dictionary();
int i = 1;
string[] playerAmounts = new string[3] { "$0", "$0", "$0" };
List puzzleBoxes = new List();
public Form1()
{
InitializeComponent();
AddSpinValues();
labelLetters.Text = availableLetters;
textBoxP1.Text = playerAmounts[0];
textBoxP2.Text = playerAmounts[1];
textBoxP3.Text = playerAmounts[2];
if (i > 3) i = 1;
labelPrompt.Text = "Player " + i + " Spin or Solve";
puzzleBoxes.Add(textBox1);
puzzleBoxes.Add(textBox2);
puzzleBoxes.Add(textBox3);
puzzleBoxes.Add(textBox4);
puzzleBoxes.Add(textBox5);
puzzleBoxes.Add(textBox6);
puzzleBoxes.Add(textBox7);
puzzleBoxes.Add(textBox8);
13. {
d.labelDialog.Text = "Operation Cancelled";
}
d.Dispose();
if (puzzle.Contains(input.ToString()))
{
int n = puzzle.Count(x => x == input);
playerAmounts[i - 1] = "$" + (Convert.ToInt32(playerAmounts[i - 1].Substring(1)) + (n *
amountGot)).ToString();
if (i == 1) textBoxP1.Text = playerAmounts[i - 1];
else if (i==2) textBoxP2.Text = playerAmounts[i - 1];
else textBoxP3.Text = playerAmounts[i - 1];
List indexes = AllIndexesOf(puzzle, input.ToString());
foreach(int x in indexes)
{
puzzleBoxes[x - 1].Text = puzzle[i].ToString();
}
}
else
{
MessageBox.Show("In Correct");
}
i = i++;
availableLetters = availableLetters.Replace(input,' ');
labelLetters.Text = availableLetters;
labelPrompt.Text = "Player " + i + " Spin or Solve";
}
public List AllIndexesOf(string str, string value)
{
if (String.IsNullOrEmpty(value))
throw new ArgumentException("the string to find may not be empty", "value");
List indexes = new List();
for (int index = 0; ; index += value.Length)
{
index = str.IndexOf(value, index);
14. if (index == -1)
return indexes;
indexes.Add(index);
}
}
}
}
dialog designer:
namespace Wheel_Of_Fortune
{
partial class Dialog
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.labelDialog = new System.Windows.Forms.Label();
15. this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// labelDialog
//
this.labelDialog.AutoSize = true;
this.labelDialog.Location = new System.Drawing.Point(63, 13);
this.labelDialog.Name = "labelDialog";
this.labelDialog.Size = new System.Drawing.Size(59, 13);
this.labelDialog.TabIndex = 0;
this.labelDialog.Text = "labelDialog";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(66, 48);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 1;
//
// Dialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(407, 102);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.labelDialog);
this.Name = "Dialog";
this.Text = "Dialog";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.Label labelDialog;
public System.Windows.Forms.TextBox textBox1;
}
}