Card Game

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Card Game as PDF for free.

More details

  • Words: 1,416
  • Pages: 2
DANILO G. NICOLAS JR. JOHN PAUL ANCHORIZ Card Game

If OptHeart = True And x = 4 And y = 4 And z = 4 Then LblMessage.Caption = "JACKPOT" Else LblMessage = "TRY AGAIN" End If If OptClover = True And x = 1 Then LblMessage.Caption = "GOOD" ElseIf OptClover = True And y = 1 Then LblMessage.Caption = "GOOD" ElseIf OptClover = True And z = 1 Then LblMessage.Caption = "GOOD" End If

Private Sub CmdExit_Click() End End Sub Private Sub CmdPlay_Click() Timer1.Enabled = True LblMessage.Caption = "" End Sub Private Sub CmdStop_Click() Timer1.Enabled = False Dim x, y, z x = Val(Lbl1.Caption) y = Val(Lbl2.Caption) z = Val(Lbl3.Caption) If OptClover = True And x = 1 And y = 1 And z = 1 Then LblMessage.Caption = "JACKPOT" Else LblMessage = "TRY AGAIN" End If If OptDiamond = True And x = 2 And y = 2 And z = 2 Then LblMessage.Caption = "JACKPOT" Else LblMessage = "TRY AGAIN" End If If OptSpade = True And x = 3 And y = 3 And z = 3 Then LblMessage.Caption = "JACKPOT" Else LblMessage = "TRY AGAIN" End If

If OptClover = True And x = 1 And y = 1 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 1 And y = 1 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 1 And y = 1 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 2 And y = 1 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 3 And y = 1 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 4 And y = 1 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 1 And y = 2 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 1 And y = 3 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptClover = True And x = 1 And y = 4 And z = 1 Then LblMessage.Caption = "VERY GOOD" End If If OptDiamond = True And x = 2 Then LblMessage.Caption = "GOOD" ElseIf OptDiamond = True And y = 2 Then LblMessage.Caption = "GOOD" ElseIf OptDiamond = True And z = 2 Then LblMessage.Caption = "GOOD" End If

If OptDiamond = True And x = 2 And y = 2 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 2 And y = 2 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 2 And y = 2 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 3 And y = 2 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 4 And y = 2 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 1 And y = 2 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 2 And y = 1 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 2 And y = 3 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptDiamond = True And x = 2 And y = 4 And z = 2 Then LblMessage.Caption = "VERY GOOD" End If If OptSpade = True And x = 3 Then LblMessage.Caption = "GOOD" ElseIf OptSpade = True And y = 3 Then LblMessage.Caption = "GOOD" ElseIf OptSpade = True And z = 3 Then LblMessage.Caption = "GOOD" End If If OptSpade = True And x = 3 And y = 3 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 3 And y = 3 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 3 And y = 3 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 2 And y = 3 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 1 And y = 3 And z = 3 Then LblMessage.Caption = "VERY GOOD"

ElseIf OptSpade = True And x = 4 And y = 3 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 3 And y = 2 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 3 And y = 1 And

z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptSpade = True And x = 3 And y = 4 And z = 3 Then LblMessage.Caption = "VERY GOOD" End If If OptHeart = True And x = 4 Then LblMessage.Caption = "GOOD" ElseIf OptHeart = True And y = 4 Then LblMessage.Caption = "GOOD" ElseIf OptHeart = True And z = 4 Then LblMessage.Caption = "GOOD" End If If OptHeart = True And x = 4 And y = 4 And z = 2 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 4 And y = 4 And z = 3 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 4 And y = 4 And z = 1 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 2 And y = 4 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 3 And y = 4 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 1 And y = 4 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 4 And y = 2 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 4 And y = 3 And z = 4 Then LblMessage.Caption = "VERY GOOD" ElseIf OptHeart = True And x = 4 And y = 1 And z = 4 Then LblMessage.Caption = "VERY GOOD" End If End Sub Private Sub OptClover_Click() If OptClover = True Then Clover3.Visible = True Diamond3.Visible = False Spade3.Visible = False Heart3.Visible = False End If End Sub

Private Sub OptDiamond_Click If OptDiamond = True Then Clover3.Visible = False Diamond3.Visible = True Spade3.Visible = False Heart3.Visible = False

End If End Sub Private Sub OptSpade_Click() If OptSpade = True Then Clover3.Visible = False Diamond3.Visible = False Spade3.Visible = True Heart3.Visible = False End If End Sub Private Sub OptHeart_Click() If OptHeart = True Then Clover3.Visible = False Diamond3.Visible = False Spade3.Visible = False Heart3.Visible = True End If End Sub Private Sub Timer1_Timer() Lbl1.Caption = Int(4 * Rnd()) + 1 Lbl2.Caption = Int(4 * Rnd()) + 1 Lbl3.Caption = Int(4 * Rnd()) + 1 Dim x, y, z x = Val(Lbl1.Caption) y = Val(Lbl2.Caption) z = Val(Lbl3.Caption)

If x = 1 Then Clover2.Visible = True Diamond2.Visible = False Spade2.Visible = False Heart2.Visible = False ElseIf x = 2 Then Clover2.Visible = False Diamond2.Visible = True Spade2.Visible = False Heart2.Visible = False ElseIf x = 3 Then Clover2.Visible = False Diamond2.Visible = False Spade2.Visible = True Heart2.Visible = False ElseIf x = 4 Then Clover2.Visible = False Diamond2.Visible = False Spade2.Visible = False Heart2.Visible = True End If

If y = 1 Then Clover1.Visible = True Diamond1.Visible = False Spade1.Visible = False Heart1.Visible = False ElseIf y = 2 Then

Clover1.Visible = False Diamond1.Visible = True Spade1.Visible = False Heart1.Visible = False ElseIf y = 3 Then Clover1.Visible = False Diamond1.Visible = False Spade1.Visible = True Heart1.Visible = False ElseIf y = 4 Then Clover1.Visible = False Diamond1.Visible = False Spade1.Visible = False Heart1.Visible = True End If If z = 1 Then Clover.Visible = True Diamond.Visible = False Spade.Visible = False Heart.Visible = False

ElseIf z = 2 Then Clover.Visible = False Diamond.Visible = True Spade.Visible = False Heart.Visible = False ElseIf z = 3 Then Clover.Visible = False Diamond.Visible = False Spade.Visible = True Heart.Visible = False ElseIf z = 4 Then Clover.Visible = False Diamond.Visible = False Spade.Visible = False Heart.Visible = True End If End Sub

Related Documents