raging_squid
Member
- Joined
- Jun 11, 2004
- Messages
- 36
- Gender
- Male
- HSC
- 2005
how does the random function work in .net and wat are the different ways of using it. I am making a scissors paper rock game and i need the img List to display a random picture (scissors, paper or rock) at the moment it only display 2 different pictures and not 3. I am displaying the outcome in a label. How can i correct this?
below is wat i have so far
below is wat i have so far
Code:
Private Sub BtnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOk.Click
Static WhichPos As Integer = 0
lblOutcome.Image = imlOutcome.Images(WhichPos)
WhichPos += 1
WhichPos = WhichPos Mod 3
WhichPos = Int(Rnd(1 - 3)) + 1
End Sub