VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This a game simalar to Yatzee, fun though!

by Harn (8 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 13th November 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This a game simalar to Yatzee, fun though!

Rate This a game simalar to Yatzee, fun though!



Dim score As Integer
Dim rerolls As Integer
Dim d As Integer
Dim rolls As Integer

Private Sub Command1_Click()
d = Int(Rnd * 6) + 1
MsgBox d
rolls = rolls + 1
If rolls = 1 Then Text1.Text = d
If rolls = 2 Then Text2.Text = d
If rolls = 3 Then Text3.Text = d


End Sub

Private Sub Command2_Click()
rolls = 1
MsgBox "To start press Roll !!"
End Sub

Private Sub Command3_Click()
    d = Int(Rnd * 6) + 1
    MsgBox d
    rerolls = rerolls + 1
    If rerolls = 4 Then
    MsgBox "You lose"
    End
    End If
        
    If rolls = 1 Then Text1.Text = d
    If rolls = 2 Then Text2.Text = d
    If rolls = 3 Then Text3.Text = d
    
        

    
End Sub


Private Sub Command4_Click()
If Text1.Text = Text2.Text And Text2.Text = Text3.Text Then
score = 21
Else
score = score + Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)
Text4.Text = score
End If
rolls = 0
rerolls = 0
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub


Download this snippet    Add to My Saved Code

This a game simalar to Yatzee, fun though! Comments

No comments have been posted about This a game simalar to Yatzee, fun though!. Why not be the first to post a comment about This a game simalar to Yatzee, fun though!.

Post your comment

Subject:
Message:
0/1000 characters