The document provides instructions for creating a Wheel of Fortune game in C# using Visual Studio. It includes details on setting up 3 players, an initial screen with available letters and player scores, spinning a wheel to randomize prizes, allowing players to guess letters to reveal the puzzle ("Back to the Future" in this case), and checking for a correct puzzle solve. The wheel prizes range from $100 to $5000, with a -$1000 penalty space.
Python Notes for mca i year students osmania university.docx
C# using Visual studio - Windows Form. If possible step-by-step inst.pdf
1. C# using Visual studio - Windows Form. If possible step-by-step instructions as well. 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: Wheel of Fortune Available letters
ABCDEFGHIKLMNOPQRSTUMWXYZ Puzzle Solve Player 3 Player 2 Player 1 50 Player 1
Spin or Solve Note: My puzzle is "Pulp Fiction" but pick your own puzzle" Notice that Player
1 goes first (see note at bottom of screen) and can either spin or guess the puzzle by clicking the
appropriate button. If Player 1 spins, then the wheel will spin. To represent the wheel, create a
random number from 1 to 10. Each will represent a spot on the wheel. Here are the wheel values:
Random number 1: $100 Random number 2: S300 Random number 3: S500 Random number 4:
$700 Random number 5: S900 Random number 6 S2000 Random number 7: S3000 Random
number 8 S5000 Random number 9: -$1000 ll player loses S1000 from his/her total and loses
that turn Random number 10: S0 player only loses turn
Solution
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
textBox1.Text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
textBox17.Text = "$0";
textBox18.Text = "$0";
textBox19.Text = "$0";
2. }
private void Form1_Load(object sender, EventArgs e)
{
textBox1.Text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
textBox17.Text = "$0";
textBox18.Text = "$0";
textBox19.Text = "$0";
}
public void fun()
{
string s1 = "";
for (int i = 0; i < 26; i++)
{
s1 = s1 + globalvar.arr[i].ToString();
textBox1.Text = s1;
}
string s2 = textBox2.Text + textBox3.Text + textBox4.Text + textBox5.Text +
textBox6.Text + textBox7.Text + textBox8.Text;
s2 = s2 + textBox9.Text + textBox10.Text + textBox11.Text + textBox12.Text +
textBox13.Text + textBox14.Text + textBox15.Text + textBox16.Text;
if (s2.Equals("back to the future"))
{
s = "Player " + (globalvar.k + 1) + "won and score is " +
globalvar.scores[globalvar.k];
second.Show();
}
}
Prompt p = new Prompt();
private void button1_Click(object sender, EventArgs e)
{
int[] rand = new int[10]{100,300,500,700,900,2000,3000,100,-1000,0};
Random r1 = new Random();
if (globalvar.k == 0)
{
int num = r1.Next(1, 11);
3. if (num < 9)
{
MessageBox.Show("Value is :$", rand[num - 1].ToString());
p.Show();
char let = Prompt.c;
int cou=0;
if (let.Equals('b'))
{
textBox2.Text="B";
cou++;
}
else if (let.Equals('a'))
{
textBox3.Text="A";
cou++;
}
else if (let.Equals('c'))
{
textBox4.Text="C";
cou++;
}
else if (let.Equals('k'))
{
textBox5.Text="K";
cou++;
}
else if (let.Equals('t'))
{
textBox6.Text="T";
textBox8.Text="T";
textBox13.Text="T";
cou=cou+3;
4. }
else if (let.Equals('o'))
{
textBox7.Text="O";
cou++;
}
else if (let.Equals('h'))
{
textBox9.Text="H";
cou++;
}
else if (let.Equals('e'))
{
textBox10.Text="E";
textBox16.Text="E";
cou=cou+2;
}
else if (let.Equals('f'))
{
textBox11.Text="F";
cou++;
}
else if (let.Equals('u'))
{
textBox12.Text="U";
textBox14.Text="U";
cou=cou+2;
}
else if (let.Equals('r'))
{
textBox15.Text="R";
11. }
else
{
cou = 1;
MessageBox.Show("Incorrect");
}
globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] + (cou * rand[num -
1]);
globalvar.k = (globalvar.k + 1) % 3;
textBox19.Text = "$" + globalvar.scores[globalvar.k].ToString();
fun();
}
else if (num == 9)
{
globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] - 1000;
globalvar.k = (globalvar.k + 1) % 3;
textBox19.Text = "$" + globalvar.scores[globalvar.k].ToString();
fun();
}
else if (num == 10)
{
globalvar.k = (globalvar.k + 1) % 3;
fun();
}
}
}
public static string s = "";
Form2 second = new Form2();
private void button2_Click(object sender, EventArgs e)
{
Console.WriteLine("Enter the guess");
string gue = Console.ReadLine().ToLower();
if (gue.Equals("back to the future"))
{
s = "Player " + (globalvar.k + 1) + "won and score is " +
12. globalvar.scores[globalvar.k];
second.Show();
}
}
}
public static class globalvar
{
public static char[] arr = new
char[26]{'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','
T','U','V','W','X','Y','Z'};
public static int[] scores = new int[3]{0,0,0};
public static int count = 26;
public static int k = 0;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
tb.Text = Form1.s;
13. }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Prompt : Form
{
public static char c;
public Prompt()
{
char[] ch = new char[10];
InitializeComponent();
textboxprom.Text = "abcdef";
label1.Text = "Enter the letter";
string s3 = textboxprom.Text;
ch = s3.ToCharArray(1,3);
c = ch[0];
}
public String TextBox1
{
get
{
return textboxprom.Text;
}