SlideShare a Scribd company logo
1 of 14
Download to read offline
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";
}
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);
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;
}
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";
cou++;
}
else
{
cou=1;
for (int i = 0; i < 26; i++)
{
if (let.Equals(globalvar.arr[i]))
{
globalvar.arr[i] = ' ';
}
}
MessageBox.Show("Incorrect");
}
globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] +( cou*rand[num -
1]);
globalvar.k = (globalvar.k + 1) % 3;
textBox17.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;
textBox17.Text = "$" + globalvar.scores[globalvar.k].ToString();
fun();
}
else if (num == 10)
{
globalvar.k = (globalvar.k + 1) % 3;
fun();
}
}
else if (globalvar.k == 1)
{
int num = r1.Next(1, 11);
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++;
globalvar.arr[1] = ' ';
}
else if (let.Equals('a'))
{
textBox3.Text = "A";
cou++;
globalvar.arr[0] = ' ';
}
else if (let.Equals('c'))
{
textBox4.Text = "C";
cou++;
globalvar.arr[2] = ' ';
}
else if (let.Equals('k'))
{
textBox5.Text = "K";
cou++;
globalvar.arr[13] = ' ';
}
else if (let.Equals('t'))
{
textBox6.Text = "T";
textBox8.Text = "T";
textBox13.Text = "T";
cou = cou + 3;
globalvar.arr[19] = ' ';
}
else if (let.Equals('o'))
{
textBox7.Text = "O";
cou++;
globalvar.arr[14] = ' ';
}
else if (let.Equals('h'))
{
textBox9.Text = "H";
cou++;
globalvar.arr[7] = ' ';
}
else if (let.Equals('e'))
{
textBox10.Text = "E";
textBox16.Text = "E";
cou = cou + 2;
globalvar.arr[4] = ' ';
}
else if (let.Equals('f'))
{
textBox11.Text = "F";
cou++;
}
else if (let.Equals('u'))
{
textBox12.Text = "U";
textBox14.Text = "U";
cou = cou + 2;
globalvar.arr[5] = ' ';
}
else if (let.Equals('r'))
{
textBox15.Text = "R";
cou++;
globalvar.arr[17] = ' ';
}
else
{
cou = 1;
MessageBox.Show("Incorrect");
}
globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] + (cou * rand[num -
1]);
globalvar.k = (globalvar.k + 1) % 3;
textBox18.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;
textBox18.Text = "$" + globalvar.scores[globalvar.k].ToString();
fun();
}
else if (num == 10)
{
globalvar.k = (globalvar.k + 1) % 3;
fun();
}
}
else
{
int num = r1.Next(1, 11);
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++;
globalvar.arr[1] = ' ';
}
else if (let.Equals('a'))
{
textBox3.Text = "A";
cou++;
globalvar.arr[0] = ' ';
}
else if (let.Equals('c'))
{
textBox4.Text = "C";
cou++;
globalvar.arr[2] = ' ';
}
else if (let.Equals('k'))
{
textBox5.Text = "K";
cou++;
globalvar.arr[13] = ' ';
}
else if (let.Equals('t'))
{
textBox6.Text = "T";
textBox8.Text = "T";
textBox13.Text = "T";
cou = cou + 3;
globalvar.arr[19] = ' ';
}
else if (let.Equals('o'))
{
textBox7.Text = "O";
cou++;
globalvar.arr[14] = ' ';
}
else if (let.Equals('h'))
{
textBox9.Text = "H";
cou++;
globalvar.arr[7] = ' ';
}
else if (let.Equals('e'))
{
textBox10.Text = "E";
textBox16.Text = "E";
cou = cou + 2;
globalvar.arr[4] = ' ';
}
else if (let.Equals('f'))
{
textBox11.Text = "F";
cou++;
}
else if (let.Equals('u'))
{
textBox12.Text = "U";
textBox14.Text = "U";
cou = cou + 2;
globalvar.arr[5] = ' ';
}
else if (let.Equals('r'))
{
textBox15.Text = "R";
cou++;
globalvar.arr[17] = ' ';
}
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 " +
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;
}
}
}
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;
}
}
Form1 f = new Form1();
private void button1_Click(object sender, EventArgs e)
{
f.Show();
}
private void Prompt_Load(object sender, EventArgs e)
{
}
}
}

More Related Content

Similar to C# using Visual studio - Windows Form. If possible step-by-step inst.pdf

#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf
sudhinjv
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdf
aniyathikitchen
 
Introduction You implemented a Deck class in Activity 2. This cla.pdf
Introduction You implemented a Deck class in Activity 2. This cla.pdfIntroduction You implemented a Deck class in Activity 2. This cla.pdf
Introduction You implemented a Deck class in Activity 2. This cla.pdf
feelinggifts
 
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
anjandavid
 
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
Adamq0DJonese
 
write the TODO part of the program.docx
write the TODO part of the program.docxwrite the TODO part of the program.docx
write the TODO part of the program.docx
annetnash8266
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
asif1401
 
The following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdfThe following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdf
eyelineoptics
 

Similar to C# using Visual studio - Windows Form. If possible step-by-step inst.pdf (19)

Coding
CodingCoding
Coding
 
Creating masterpieces with raphael
Creating masterpieces with raphaelCreating masterpieces with raphael
Creating masterpieces with raphael
 
#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf
 
Practical File Grade 12.pdf
Practical File Grade 12.pdfPractical File Grade 12.pdf
Practical File Grade 12.pdf
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdf
 
Introduction You implemented a Deck class in Activity 2. This cla.pdf
Introduction You implemented a Deck class in Activity 2. This cla.pdfIntroduction You implemented a Deck class in Activity 2. This cla.pdf
Introduction You implemented a Deck class in Activity 2. This cla.pdf
 
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
 
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
 
write the TODO part of the program.docx
write the TODO part of the program.docxwrite the TODO part of the program.docx
write the TODO part of the program.docx
 
Lập trình Python cơ bản
Lập trình Python cơ bảnLập trình Python cơ bản
Lập trình Python cơ bản
 
data structure and algorithm.pdf
data structure and algorithm.pdfdata structure and algorithm.pdf
data structure and algorithm.pdf
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
 
Pop3ck sh
Pop3ck shPop3ck sh
Pop3ck sh
 
NO PAPER ANSWERS. ALL ANSWER SUBMISSIONS SHOULD BE ABLE TO RUN WIT.pdf
NO PAPER ANSWERS. ALL ANSWER SUBMISSIONS SHOULD BE ABLE TO RUN WIT.pdfNO PAPER ANSWERS. ALL ANSWER SUBMISSIONS SHOULD BE ABLE TO RUN WIT.pdf
NO PAPER ANSWERS. ALL ANSWER SUBMISSIONS SHOULD BE ABLE TO RUN WIT.pdf
 
tetris
tetristetris
tetris
 
[SI] Ada Lovelace Day 2014 - Tampon Run
[SI] Ada Lovelace Day 2014  - Tampon Run[SI] Ada Lovelace Day 2014  - Tampon Run
[SI] Ada Lovelace Day 2014 - Tampon Run
 
The following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdfThe following is my code for a connectn program. When I run my code .pdf
The following is my code for a connectn program. When I run my code .pdf
 
Python From Scratch (1).pdf
Python From Scratch  (1).pdfPython From Scratch  (1).pdf
Python From Scratch (1).pdf
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
 

More from fazalenterprises

Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdfBrett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
fazalenterprises
 
A number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdfA number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdf
fazalenterprises
 
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdfWhy phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
fazalenterprises
 
What is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdfWhat is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdf
fazalenterprises
 
What do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdfWhat do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdf
fazalenterprises
 
The problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdfThe problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdf
fazalenterprises
 
The FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdfThe FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdf
fazalenterprises
 
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdfRead and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
fazalenterprises
 

More from fazalenterprises (20)

Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdfBrett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
 
Being larger than the right ventricle, the left ventricle pumps more .pdf
Being larger than the right ventricle, the left ventricle pumps more .pdfBeing larger than the right ventricle, the left ventricle pumps more .pdf
Being larger than the right ventricle, the left ventricle pumps more .pdf
 
A number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdfA number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdf
 
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdfWhy phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
 
Which of the following are tertiary activities A. Lead mining.pdf
Which of the following are tertiary activities A. Lead mining.pdfWhich of the following are tertiary activities A. Lead mining.pdf
Which of the following are tertiary activities A. Lead mining.pdf
 
What is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdfWhat is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdf
 
What do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdfWhat do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdf
 
What is the difference between a neurogenic and myogenic heart Plea.pdf
What is the difference between a neurogenic and myogenic heart Plea.pdfWhat is the difference between a neurogenic and myogenic heart Plea.pdf
What is the difference between a neurogenic and myogenic heart Plea.pdf
 
This is sociology. Content Assessments Communications Resources He.pdf
This is sociology. Content Assessments Communications Resources He.pdfThis is sociology. Content Assessments Communications Resources He.pdf
This is sociology. Content Assessments Communications Resources He.pdf
 
There is an area that has been classified, according to the IEC requ.pdf
There is an area that has been classified, according to the IEC requ.pdfThere is an area that has been classified, according to the IEC requ.pdf
There is an area that has been classified, according to the IEC requ.pdf
 
The problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdfThe problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdf
 
The IRS has the right to revoke an installment agreement for any of .pdf
The IRS has the right to revoke an installment agreement for any of .pdfThe IRS has the right to revoke an installment agreement for any of .pdf
The IRS has the right to revoke an installment agreement for any of .pdf
 
The FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdfThe FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdf
 
A difference between bacterial and eukaryotic transcriptionMultipl.pdf
A difference between bacterial and eukaryotic transcriptionMultipl.pdfA difference between bacterial and eukaryotic transcriptionMultipl.pdf
A difference between bacterial and eukaryotic transcriptionMultipl.pdf
 
Ten independent observations were made of the time to load a pallet..pdf
Ten independent observations were made of the time to load a pallet..pdfTen independent observations were made of the time to load a pallet..pdf
Ten independent observations were made of the time to load a pallet..pdf
 
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdfRead and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
 
QUESTION 2 The current account is the record of O a. foreign investme.pdf
QUESTION 2 The current account is the record of O a. foreign investme.pdfQUESTION 2 The current account is the record of O a. foreign investme.pdf
QUESTION 2 The current account is the record of O a. foreign investme.pdf
 
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdfMULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
 
Mendel’s law of dominance supports thatOne person dominates over .pdf
Mendel’s law of dominance supports thatOne person dominates over .pdfMendel’s law of dominance supports thatOne person dominates over .pdf
Mendel’s law of dominance supports thatOne person dominates over .pdf
 
Many of the more industrialized countries have sought to reform thei.pdf
Many of the more industrialized countries have sought to reform thei.pdfMany of the more industrialized countries have sought to reform thei.pdf
Many of the more industrialized countries have sought to reform thei.pdf
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
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";
  • 5. cou++; } else { cou=1; for (int i = 0; i < 26; i++) { if (let.Equals(globalvar.arr[i])) { globalvar.arr[i] = ' '; } } MessageBox.Show("Incorrect"); } globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] +( cou*rand[num - 1]); globalvar.k = (globalvar.k + 1) % 3; textBox17.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; textBox17.Text = "$" + globalvar.scores[globalvar.k].ToString(); fun(); } else if (num == 10) { globalvar.k = (globalvar.k + 1) % 3; fun(); } }
  • 6. else if (globalvar.k == 1) { int num = r1.Next(1, 11); 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++; globalvar.arr[1] = ' '; } else if (let.Equals('a')) { textBox3.Text = "A"; cou++; globalvar.arr[0] = ' '; } else if (let.Equals('c')) { textBox4.Text = "C"; cou++; globalvar.arr[2] = ' '; } else if (let.Equals('k')) { textBox5.Text = "K"; cou++; globalvar.arr[13] = ' '; } else if (let.Equals('t')) { textBox6.Text = "T";
  • 7. textBox8.Text = "T"; textBox13.Text = "T"; cou = cou + 3; globalvar.arr[19] = ' '; } else if (let.Equals('o')) { textBox7.Text = "O"; cou++; globalvar.arr[14] = ' '; } else if (let.Equals('h')) { textBox9.Text = "H"; cou++; globalvar.arr[7] = ' '; } else if (let.Equals('e')) { textBox10.Text = "E"; textBox16.Text = "E"; cou = cou + 2; globalvar.arr[4] = ' '; } else if (let.Equals('f')) { textBox11.Text = "F"; cou++; } else if (let.Equals('u')) { textBox12.Text = "U"; textBox14.Text = "U"; cou = cou + 2; globalvar.arr[5] = ' '; }
  • 8. else if (let.Equals('r')) { textBox15.Text = "R"; cou++; globalvar.arr[17] = ' '; } else { cou = 1; MessageBox.Show("Incorrect"); } globalvar.scores[globalvar.k] = globalvar.scores[globalvar.k] + (cou * rand[num - 1]); globalvar.k = (globalvar.k + 1) % 3; textBox18.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; textBox18.Text = "$" + globalvar.scores[globalvar.k].ToString(); fun(); } else if (num == 10) { globalvar.k = (globalvar.k + 1) % 3; fun(); } } else { int num = r1.Next(1, 11); if (num < 9) {
  • 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++; globalvar.arr[1] = ' '; } else if (let.Equals('a')) { textBox3.Text = "A"; cou++; globalvar.arr[0] = ' '; } else if (let.Equals('c')) { textBox4.Text = "C"; cou++; globalvar.arr[2] = ' '; } else if (let.Equals('k')) { textBox5.Text = "K"; cou++; globalvar.arr[13] = ' '; } else if (let.Equals('t')) { textBox6.Text = "T"; textBox8.Text = "T"; textBox13.Text = "T"; cou = cou + 3; globalvar.arr[19] = ' '; }
  • 10. else if (let.Equals('o')) { textBox7.Text = "O"; cou++; globalvar.arr[14] = ' '; } else if (let.Equals('h')) { textBox9.Text = "H"; cou++; globalvar.arr[7] = ' '; } else if (let.Equals('e')) { textBox10.Text = "E"; textBox16.Text = "E"; cou = cou + 2; globalvar.arr[4] = ' '; } else if (let.Equals('f')) { textBox11.Text = "F"; cou++; } else if (let.Equals('u')) { textBox12.Text = "U"; textBox14.Text = "U"; cou = cou + 2; globalvar.arr[5] = ' '; } else if (let.Equals('r')) { textBox15.Text = "R"; cou++; globalvar.arr[17] = ' ';
  • 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; }
  • 14. } Form1 f = new Form1(); private void button1_Click(object sender, EventArgs e) { f.Show(); } private void Prompt_Load(object sender, EventArgs e) { } } }