Gamble: Higher or Lower?

Post new topic   Reply to topic

View previous topic View next topic Go down

Gamble: Higher or Lower?

Post  Robin on Mon Sep 01, 2008 5:20 pm

I guess some people know this little game...

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       
        Dim spin As String = Int(Rnd() * 12)
        Label9.Text = Label1.Text
        Label1.Text = spin

        If Label9.Text > Label1.Text Then
            Label6.Text += Int(1)
        Else
            Label5.Text += Int(1)
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       
        Dim spin As String = Int(Rnd() * 12)
        Label9.Text = Label1.Text
        Label1.Text = spin

        If Label9.Text < Label1.Text Then
            Label6.Text += Int(1)
        Else
            Label5.Text += Int(1)
        End If
    End Sub
End Class


You may need to alter the label name, for example, instead of Label1.Text, MyLabel.Text



This is how the program will look when it is finished.

YOU CAN DOWNLOAD THIS APPLICATION HERE

Robin
Moderator
Moderator

Number of posts: 11
Age: 18
Location: Holland
Registration date: 2008-08-31

View user profile

Back to top Go down

Topic Moved ...

Post  conorsteel on Tue Sep 02, 2008 1:06 am

This topic shouldn't be in Game Development, if it was a complete how to on making a game, it would be in tutorials, you should put all the program files up for download.

MOVED TO CODE VAULT

conorsteel
Admin
Admin

Number of posts: 13
Age: 16
Location: Kilmarnock, Scotland
Registration date: 2008-08-31

View user profile http://homefinanceviewer.webs.com

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum