F
Flanders
I have developed a small arcade game with the help of a few VB books. A
scoring system was implemented in the design of the game but I as hoping
that some one would be able to instruct me on how display the score at the
end of the game. At the moment when a player finishes the game I have a
window displaying "Puzzle Solved." If I could display the players score
under this in the same window would be great.
This is a quick copy and paste of a sample of the high score code.
I just need a way to display the score in a box.
Public Function GetPuzzle(ByVal level As Integer) As String
Dim score As Integer
Dim result As String
Do
result = GenerateNewPuzzle(level, score)
If result <> String.Empty Then
'check if puzzle matches the level of difficult
Select Case level
'average for this level is 4400
Case 1
If score >= 4200 And score <= 4600 Then
Exit Do
End If
'average for this level is 5100
Case 2
If score >= 4900 And score <= 5300 Then
Exit Do
End If
'average for this level is 5800
Case 3
If score >= 5600 And score <= 6000 Then
Exit Do
End If
'average for this level is 11400
Case 4
If score >= 11200 And score <= 11600 Then
Exit Do
End If
End Select
End If
Loop Until False
Return result
End Function
scoring system was implemented in the design of the game but I as hoping
that some one would be able to instruct me on how display the score at the
end of the game. At the moment when a player finishes the game I have a
window displaying "Puzzle Solved." If I could display the players score
under this in the same window would be great.
This is a quick copy and paste of a sample of the high score code.
I just need a way to display the score in a box.
Public Function GetPuzzle(ByVal level As Integer) As String
Dim score As Integer
Dim result As String
Do
result = GenerateNewPuzzle(level, score)
If result <> String.Empty Then
'check if puzzle matches the level of difficult
Select Case level
'average for this level is 4400
Case 1
If score >= 4200 And score <= 4600 Then
Exit Do
End If
'average for this level is 5100
Case 2
If score >= 4900 And score <= 5300 Then
Exit Do
End If
'average for this level is 5800
Case 3
If score >= 5600 And score <= 6000 Then
Exit Do
End If
'average for this level is 11400
Case 4
If score >= 11200 And score <= 11600 Then
Exit Do
End If
End Select
End If
Loop Until False
Return result
End Function