I got a college assignment to do to make who wants to be a millionaire game
Public Class Form1
Structure question
Dim question As String
Dim A As String
Dim b As String
Dim c As String
Dim d As String
Dim answer As String
End Structure
Dim questions(14) As question
Dim currentquestion As Integer = 0
Dim Prizemoney(14) As Integer
Private Sub setupprizemoney()
Prizemoney(0) = "100"
Prizemoney(1) = "200"
Prizemoney(2) = "300"
Prizemoney(3) = "500"
Prizemoney(4) = "1000"
Prizemoney(5) = "2000"
Prizemoney(6) = "4000"
Prizemoney(7) = "8000"
Prizemoney(8) = "16000"
Prizemoney(9) = "32000"
Prizemoney(10) = "54000"
Prizemoney(11) = "125000"
Prizemoney(12) = "250000"
Prizemoney(13) = "500000"
Prizemoney(14) = "1000000"
End Sub
Private Sub setupquestions()
questions(0).question = "how many moons do we have?"
questions(0).A = "2"
questions(0).b = "1"
questions(0).c = "984"
questions(0).d = "We have a moon?"
questions(0).answer = "1"
questions(1).question = "Who was the first president of america?"
questions(1).A = "Kevin"
questions(1).b = "George washington"
questions(1).c = "Tariq Salameh"
questions(1).d = "Abraham lincoln"
questions(1).answer = "George washington"
questions(2).question = "Who sang the song in 1974 called 'no woman no cry?'"
questions(2).A = "Barrack obama"
questions(2).b = "Tariq Salameh"
questions(2).c = "Bob Marley"
questions(2).d = "Justin bieber"
questions(2).answer = "Bob Marley"
questions(3).question = "Am i cool?"
questions(3).A = "Yes"
questions(3).b = "No"
questions(3).c = "Chewing gum"
questions(3).d = "Abraham lincoln"
questions(3).answer = "Yes"
questions(4).question = "Who was the first Tv chef?"
questions(4).A = "Franny craddock"
questions(4).b = "Tony blaire"
questions(4).c = "Kevin"
questions(4).d = "Abraham lincoln"
questions(4).answer = "Franny craddock"
questions(5).question = "How old is craig?"
questions(5).A = "7"
questions(5).b = "30"
questions(5).c = "Its over 9000!"
questions(5).d = "99"
questions(5).answer = "Its over 9000!"
questions(6).question = "Who was the first president of america?"
questions(6).A = "Barrack obama"
questions(6).b = "George washington"
questions(6).c = "George Bush"
questions(6).d = "Abraham lincoln"
questions(6).answer = "George washington"
questions(7).question = "Who created mankind?"
questions(7).A = "Not sure"
questions(7).b = "Maybe kevin?"
questions(7).c = "could be phil?"
questions(7).d = "Nah im sure its kevin"
questions(7).answer = "Nah im sure its kevin"
questions(8).question = "Where does Tariq live?"
questions(8).A = "Gy"
questions(8).b = "Meggies"
questions(8).c = "kevin"
questions(8).d = "Humberstone avenue"
questions(8).answer = "Gy"
questions(9).question = "Who was the first president of america?"
questions(9).A = "kevin"
questions(9).b = "kevin"
questions(9).c = "kevin"
questions(9).d = "George washington"
questions(9).answer = "George washington"
questions(10).question = "Kevin?"
questions(10).A = "Sleep"
questions(10).b = "Cool"
questions(10).c = "Hard working"
questions(10).d = "Legend"
questions(10).answer = "Sleep"
questions(11).question = "Tariq For?"
questions(11).A = "Kevin"
questions(11).b = "Amy <---THE ANSWER!"
questions(11).c = "Nobody (im Lonely)"
questions(11).d = "Lucy Pinder"
questions(11).answer = "Amy <---THE ANSWER!"
questions(12).question = "Who was the first president of america?"
questions(12).A = "Barrack obama"
questions(12).b = "George washington"
questions(12).c = "George Bush"
questions(12).d = "Abraham lincoln"
questions(12).answer = "George washington"
questions(13).question = "Who was the first president of america?"
questions(13).A = "Barrack obama"
questions(13).b = "George washington"
questions(13).c = "George Bush"
questions(13).d = "Abraham lincoln"
questions(13).answer = "George washington"
questions(14).question = "Im just too cool?"
questions(14).A = "Yeah right"
questions(14).b = "We love you Tariq!"
questions(14).c = "Africa"
questions(14).d = "Trololololo"
questions(14).answer = "Trololololo"
End Sub
Private Sub showquestion(ByVal Q As Integer)
Button1.Visible = True
Button2.Visible = True
Button3.Visible = True
Button4.Visible = True
Label1.Text = questions(Q).question
Button1.Text = questions(Q).A
Button2.Text = questions(Q).b
Button3.Text = questions(Q).c
Button4.Text = questions(Q).d
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
setupquestions()
showquestion(currentquestion)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = questions(currentquestion).answer Then
MsgBox("Correct")
currentquestion = currentquestion + 1
showquestion(currentquestion)
Else
MsgBox("wrong")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Button2.Text = questions(currentquestion).answer Then
MsgBox("Correct")
currentquestion = currentquestion + 1
showquestion(currentquestion)
Else
MsgBox("wrong")
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If Button3.Text = questions(currentquestion).answer Then
MsgBox("Correct")
currentquestion = currentquestion + 1
showquestion(currentquestion)
Else
MsgBox("wrong")
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = questions(currentquestion).answer Then
MsgBox("Correct")
currentquestion = currentquestion + 1
showquestion(currentquestion)
Else
MsgBox("wrong")
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim r As New Random
Dim removed As Integer = 0
Dim number As Integer
number = r.Next(0, 3)
Select Case number
Case 0
If Button1.Text = questions(currentquestion).answer Then
Else
Button1.Visible = False = removed + 1
If removed < 2 Then
number = r.Next(0, 3)
End If
End If
Case 1
If Button2.Text = questions(currentquestion).answer Then
Else
Button2.Visible = False = removed + 1
If removed < 2 Then
number = r.Next(0, 3)
End If
End If
Case 2
If Button3.Text = questions(currentquestion).answer Then
Else
Button3.Visible = False = removed + 1
If removed < 2 Then
number = r.Next(0, 3)
End If
End If
Case 3
If Button4.Text = questions(currentquestion).answer Then
Else
Button4.Visible = False = removed + 1
If removed < 2 Then
number = r.Next(0, 3)
End If
End If
End Select
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim responses(15) As String
responses(0) = "I think the answer is 1"
responses(1) = "I think The answer is George washington"
responses(2) = "I think the answer is bob marley"
responses(4) = "I think the answe is Abhraham lincoln"
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub
End Class
I am stuck with connecting the questions with the array of prizemoney.
I am also stuck on doing the phone a friend lifeline and the ask the audience.
I am new to all this some any tips please?

New Topic/Question
This topic is locked



MultiQuote








|