- Home
·
- Games
·
- Dice Game 2.0- This Dice Game is basically Yatzee it is very fine and works fantastically.
Dice Game 2.0- This Dice Game is basically Yatzee it is very fine and works fantastically.
Dice Game 2.0- This Dice Game is basically Yatzee it is very fine and works fantastically.
API Declarations
KEEP commandbutton
Label1 Label
Label2 Label
Label3 Label
Label4 Label
Label5 Label
R1 Textbox
R2 textbox
R3 textbox
Reroll commandbutton
Roll commandbutton
round textbox
scoreb textbox
Rate Dice Game 2.0- This Dice Game is basically Yatzee it is very fine and works fantastically.
(1(1 Vote))
Dim r As Integer
Dim rr As Integer
Dim score As Integer
Dim rou As Integer
Private Sub Form_Load()
rno = 1
Randomize Timer
keep.Enabled = False
reroll.Enabled = False
rr = 0
rou = 1
round.Text = rou
End Sub
Private Sub keep_Click()
roll.Enabled = True
keep.Enabled = False
reroll.Enabled = False
If rno = 4 Then
MsgBox "Round Over!"
If CInt(r1.Text) = CInt(r2.Text) And CInt(r2.Text) = CInt(r3.Text) Then
score = score + 21
Else
score = score + CInt(r1.Text) + CInt(r2.Text) + CInt(r3.Text)
End If
scoreb.Text = score
rno = 1
rr = 0
rou = rou + 1
round.Text = rou
If rou = 10 Then
MsgBox "Game"
End
End If
End If
End Sub
Private Sub reroll_Click()
rr = rr + 1
If rno = 2 Then
rno = 1
reroll.Enabled = False
keep.Enabled = False
roll.Enabled = True
ElseIf rno = 3 Then
rno = 2
reroll.Enabled = False
keep.Enabled = False
roll.Enabled = True
ElseIf rno = 4 Then
rno = 3
reroll.Enabled = False
keep.Enabled = False
roll.Enabled = True
End If
End Sub
Private Sub roll_Click()
r = Int(Rnd * 6) + 1
If rno = 1 Then
r1.Text = r
rno = 2
roll.Enabled = False
keep.Enabled = True
If rr < 4 Then
reroll.Enabled = True
End If
ElseIf rno = 2 Then
r2.Text = r
rno = 3
roll.Enabled = False
keep.Enabled = True
If rr < 4 Then
reroll.Enabled = True
End If
ElseIf rno = 3 Then
r3.Text = r
roll.Enabled = False
keep.Enabled = True
If rr < 4 Then
reroll.Enabled = True
End If
rno = 4
End If
End Sub
Dice Game 2.0- This Dice Game is basically Yatzee it is very fine and works fantastically. Comments
No comments yet — be the first to post one!
Post a Comment