Advertisement
ChaplerW

Untitled

Apr 9th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Dim card1 As Integer
  3.     Dim card2 As Integer
  4.     Dim card3 As Integer
  5.     Dim card4 As Integer
  6.     Dim card5 As Integer
  7.     Dim card6 As Integer
  8.     Dim card7 As Integer
  9.     Dim card8 As Integer
  10.     Dim card9 As Integer
  11.     Dim card11 As Integer
  12.     Dim card12 As Integer
  13.     Dim card13 As Integer
  14.     Dim card14 As Integer
  15.     Dim card15 As Integer
  16.     Dim card16 As Integer
  17.     Dim card17 As Integer
  18.     Dim card18 As Integer
  19.     Dim card19 As Integer
  20.     Dim card20 As Integer
  21.     Dim card21 As Integer
  22.     Dim card22 As Integer
  23.     Dim card23 As Integer
  24.     Dim card24 As Integer
  25.     Dim card25 As Integer
  26.     Dim card26 As Integer
  27.     Dim card27 As Integer
  28.     Dim card28 As Integer
  29.     Dim card29 As Integer
  30.     Dim card30 As Integer
  31.     Dim card31 As Integer
  32.     Dim card32 As Integer
  33.     Dim card33 As Integer
  34.     Dim card34 As Integer
  35.     Dim card35 As Integer
  36.     Dim card36 As Integer
  37.     Dim card37 As Integer
  38.     Dim card38 As Integer
  39.     Dim card39 As Integer
  40.     Dim card40 As Integer
  41.     Dim card41 As Integer
  42.     Dim card42 As Integer
  43.     Dim card43 As Integer
  44.     Dim card44 As Integer
  45.     Dim card45 As Integer
  46.     Dim card46 As Integer
  47.     Dim card47 As Integer
  48.     Dim card48 As Integer
  49.     Dim card49 As Integer
  50.     Dim card50 As Integer
  51.     Dim card51 As Integer
  52.     Dim card52 As Integer
  53.     Dim card10 As Integer
  54.  
  55.  
  56.     Dim score1 As Integer = 26
  57.     Dim score2 As Integer = 26
  58.  
  59.     Dim pointVal1 As Integer
  60.     Dim pointVal2 As Integer
  61.  
  62.  
  63.  
  64.  
  65.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  66.  
  67.         lblP2Score.Text = (lblP2Score.Text - 1)
  68.         lblP1Score.Text = (lblP1Score.Text - 1)
  69.  
  70.         Randomize()
  71.  
  72.  
  73.         card1 = Int(Rnd() * 52) + 1
  74.         card2 = Int(Rnd() * 52) + 1
  75.         card3 = Int(Rnd() * 52) + 1
  76.         card4 = Int(Rnd() * 52) + 1
  77.         card5 = Int(Rnd() * 52) + 1
  78.         card6 = Int(Rnd() * 52) + 1
  79.         card7 = Int(Rnd() * 52) + 1
  80.         card8 = Int(Rnd() * 52) + 1
  81.         card9 = Int(Rnd() * 52) + 1
  82.         card10 = Int(Rnd() * 52) + 1
  83.         card11 = Int(Rnd() * 52) + 1
  84.         card12 = Int(Rnd() * 52) + 1
  85.         card13 = Int(Rnd() * 52) + 1
  86.         card14 = Int(Rnd() * 52) + 1
  87.         card15 = Int(Rnd() * 52) + 1
  88.         card16 = Int(Rnd() * 52) + 1
  89.         card17 = Int(Rnd() * 52) + 1
  90.         card18 = Int(Rnd() * 52) + 1
  91.         card19 = Int(Rnd() * 52) + 1
  92.         card20 = Int(Rnd() * 52) + 1
  93.         card21 = Int(Rnd() * 52) + 1
  94.         card22 = Int(Rnd() * 52) + 1
  95.         card23 = Int(Rnd() * 52) + 1
  96.         card24 = Int(Rnd() * 52) + 1
  97.         card25 = Int(Rnd() * 52) + 1
  98.         card26 = Int(Rnd() * 52) + 1
  99.         card27 = Int(Rnd() * 52) + 1
  100.         card28 = Int(Rnd() * 52) + 1
  101.         card29 = Int(Rnd() * 52) + 1
  102.         card30 = Int(Rnd() * 52) + 1
  103.         card31 = Int(Rnd() * 52) + 1
  104.         card32 = Int(Rnd() * 52) + 1
  105.         card33 = Int(Rnd() * 52) + 1
  106.         card34 = Int(Rnd() * 52) + 1
  107.         card35 = Int(Rnd() * 52) + 1
  108.         card36 = Int(Rnd() * 52) + 1
  109.         card37 = Int(Rnd() * 52) + 1
  110.         card38 = Int(Rnd() * 52) + 1
  111.         card39 = Int(Rnd() * 52) + 1
  112.         card40 = Int(Rnd() * 52) + 1
  113.         card41 = Int(Rnd() * 52) + 1
  114.         card42 = Int(Rnd() * 52) + 1
  115.         card43 = Int(Rnd() * 52) + 1
  116.         card44 = Int(Rnd() * 52) + 1
  117.         card45 = Int(Rnd() * 52) + 1
  118.         card46 = Int(Rnd() * 52) + 1
  119.         card47 = Int(Rnd() * 52) + 1
  120.         card48 = Int(Rnd() * 52) + 1
  121.         card49 = Int(Rnd() * 52) + 1
  122.         card50 = Int(Rnd() * 52) + 1
  123.         card51 = Int(Rnd() * 52) + 1
  124.         card52 = Int(Rnd() * 52) + 1
  125.  
  126.         Label1.Text = card1
  127.         Label2.Text = card2
  128.         Label2.Text = card3
  129.         Label2.Text = card4
  130.         Label2.Text = card5
  131.         Label2.Text = card6
  132.         Label2.Text = card7
  133.         Label2.Text = card8
  134.         Label2.Text = card9
  135.         Label2.Text = card10
  136.         Label2.Text = card11
  137.         Label2.Text = card12
  138.         Label2.Text = card13
  139.         Label2.Text = card14
  140.         Label2.Text = card15
  141.         Label2.Text = card16
  142.         Label2.Text = card17
  143.         Label2.Text = card18
  144.         Label2.Text = card19
  145.         Label2.Text = card20
  146.         Label2.Text = card21
  147.         Label2.Text = card22
  148.         Label2.Text = card23
  149.         Label2.Text = card24
  150.         Label2.Text = card25
  151.         Label2.Text = card26
  152.         Label2.Text = card27
  153.         Label2.Text = card28
  154.         Label2.Text = card29
  155.         Label2.Text = card30
  156.         Label2.Text = card31
  157.         Label2.Text = card32
  158.         Label2.Text = card33
  159.         Label2.Text = card34
  160.         Label2.Text = card35
  161.         Label2.Text = card36
  162.         Label2.Text = card37
  163.         Label2.Text = card38
  164.         Label2.Text = card39
  165.         Label2.Text = card40
  166.         Label2.Text = card41
  167.         Label2.Text = card42
  168.         Label2.Text = card43
  169.         Label2.Text = card44
  170.         Label2.Text = card45
  171.         Label2.Text = card46
  172.         Label2.Text = card47
  173.         Label2.Text = card48
  174.         Label2.Text = card49
  175.         Label2.Text = card50
  176.         Label2.Text = card51
  177.         Label2.Text = card52
  178.  
  179.  
  180.         If card1 = 1 Then
  181.  
  182.             PictureBox1.BackgroundImage = My.Resources.aceclubs
  183.             pointVal1 = 14
  184.  
  185.         ElseIf card1 = 2 Then
  186.  
  187.             PictureBox1.BackgroundImage = My.Resources._2clubs
  188.             pointVal1 = 2
  189.  
  190.         ElseIf card1 = 3 Then
  191.  
  192.             PictureBox1.BackgroundImage = My.Resources._3clubs
  193.             pointVal1 = 3
  194.  
  195.         ElseIf card1 = 4 Then
  196.  
  197.             PictureBox1.BackgroundImage = My.Resources._4clubs
  198.             pointVal1 = 4
  199.  
  200.         ElseIf card1 = 5 Then
  201.  
  202.             PictureBox1.BackgroundImage = My.Resources._5clubs
  203.             pointVal1 = 5
  204.  
  205.         ElseIf card1 = 6 Then
  206.  
  207.             PictureBox1.BackgroundImage = My.Resources._6clubs
  208.             pointVal1 = 6
  209.  
  210.         ElseIf card1 = 27 Then
  211.  
  212.             PictureBox1.BackgroundImage = My.Resources._7clubs
  213.             pointVal1 = 7
  214.  
  215.         ElseIf card1 = 8 Then
  216.  
  217.             PictureBox1.BackgroundImage = My.Resources._8clubs
  218.             pointVal1 = 8
  219.  
  220.         ElseIf card1 = 9 Then
  221.  
  222.             PictureBox1.BackgroundImage = My.Resources._9clubs
  223.             pointVal1 = 9
  224.  
  225.         ElseIf card1 = 10 Then
  226.  
  227.             PictureBox1.BackgroundImage = My.Resources._10clubs
  228.             pointVal1 = 10
  229.  
  230.         ElseIf card1 = 11 Then
  231.  
  232.             PictureBox1.BackgroundImage = My.Resources.jackclubs
  233.             pointVal1 = 11
  234.  
  235.         ElseIf card1 = 12 Then
  236.  
  237.             PictureBox1.BackgroundImage = My.Resources.queenclubs
  238.             pointVal1 = 12
  239.  
  240.         ElseIf card1 = 13 Then
  241.  
  242.             PictureBox1.BackgroundImage = My.Resources.kingclubs
  243.             pointVal1 = 13
  244.  
  245.         ElseIf card1 = 14 Then
  246.  
  247.             PictureBox1.BackgroundImage = My.Resources.acehearts
  248.  
  249.             pointVal1 = 14
  250.  
  251.         ElseIf card1 = 15 Then
  252.  
  253.             PictureBox1.BackgroundImage = My.Resources._2hearts
  254.             pointVal1 = 2
  255.  
  256.         ElseIf card1 = 16 Then
  257.  
  258.             PictureBox1.BackgroundImage = My.Resources._3hearts
  259.             pointVal1 = 3
  260.  
  261.         ElseIf card1 = 17 Then
  262.  
  263.             PictureBox1.BackgroundImage = My.Resources._4hearts
  264.             pointVal1 = 4
  265.  
  266.         ElseIf card1 = 18 Then
  267.  
  268.             PictureBox1.BackgroundImage = My.Resources._5hearts
  269.             pointVal1 = 5
  270.  
  271.         ElseIf card1 = 19 Then
  272.  
  273.             PictureBox1.BackgroundImage = My.Resources._6hearts
  274.             pointVal1 = 6
  275.  
  276.         ElseIf card1 = 20 Then
  277.  
  278.             PictureBox1.BackgroundImage = My.Resources._7hearts
  279.             pointVal1 = 7
  280.  
  281.         ElseIf card1 = 21 Then
  282.  
  283.             PictureBox1.BackgroundImage = My.Resources._8hearts
  284.             pointVal1 = 8
  285.  
  286.         ElseIf card1 = 22 Then
  287.  
  288.             PictureBox1.BackgroundImage = My.Resources._9hearts
  289.             pointVal1 = 9
  290.  
  291.         ElseIf card1 = 23 Then
  292.  
  293.             PictureBox1.BackgroundImage = My.Resources._10hearts
  294.             pointVal1 = 10
  295.  
  296.         ElseIf card1 = 24 Then
  297.  
  298.             PictureBox1.BackgroundImage = My.Resources.jackhearts
  299.             pointVal1 = 11
  300.  
  301.         ElseIf card1 = 25 Then
  302.  
  303.             PictureBox1.BackgroundImage = My.Resources.queenhearts
  304.             pointVal1 = 12
  305.  
  306.         ElseIf card1 = 26 Then
  307.  
  308.             PictureBox1.BackgroundImage = My.Resources.kinghearts
  309.             pointVal1 = 13
  310.  
  311.         ElseIf card1 = 27 Then
  312.  
  313.             PictureBox1.BackgroundImage = My.Resources.acespades
  314.             pointVal1 = 14
  315.  
  316.         ElseIf card1 = 28 Then
  317.  
  318.             PictureBox1.BackgroundImage = My.Resources._2spades
  319.             pointVal1 = 2
  320.  
  321.         ElseIf card1 = 29 Then
  322.  
  323.             PictureBox1.BackgroundImage = My.Resources._3spades
  324.             pointVal1 = 3
  325.  
  326.         ElseIf card1 = 30 Then
  327.  
  328.             PictureBox1.BackgroundImage = My.Resources._4spades
  329.             pointVal1 = 4
  330.  
  331.         ElseIf card1 = 31 Then
  332.  
  333.             PictureBox1.BackgroundImage = My.Resources._5spades
  334.             pointVal1 = 5
  335.  
  336.         ElseIf card1 = 32 Then
  337.  
  338.             PictureBox1.BackgroundImage = My.Resources._6spades
  339.             pointVal1 = 6
  340.  
  341.         ElseIf card1 = 33 Then
  342.  
  343.             PictureBox1.BackgroundImage = My.Resources._7spades
  344.             pointVal1 = 7
  345.  
  346.         ElseIf card1 = 34 Then
  347.  
  348.             PictureBox1.BackgroundImage = My.Resources._8spades
  349.             pointVal1 = 8
  350.  
  351.         ElseIf card1 = 35 Then
  352.  
  353.             PictureBox1.BackgroundImage = My.Resources._9spades
  354.             pointVal1 = 9
  355.  
  356.         ElseIf card1 = 36 Then
  357.  
  358.             PictureBox1.BackgroundImage = My.Resources._10spades
  359.             pointVal1 = 10
  360.  
  361.         ElseIf card1 = 37 Then
  362.  
  363.             PictureBox1.BackgroundImage = My.Resources.jackspades
  364.             pointVal1 = 11
  365.  
  366.         ElseIf card1 = 38 Then
  367.  
  368.             PictureBox1.BackgroundImage = My.Resources.queenspades
  369.             pointVal1 = 12
  370.  
  371.         ElseIf card1 = 39 Then
  372.  
  373.             PictureBox1.BackgroundImage = My.Resources.kingspades
  374.             pointVal1 = 13
  375.  
  376.         ElseIf card1 = 40 Then
  377.  
  378.             PictureBox1.BackgroundImage = My.Resources.acediamonds
  379.             pointVal1 = 14
  380.  
  381.         ElseIf card1 = 41 Then
  382.  
  383.             PictureBox1.BackgroundImage = My.Resources._2diamonds
  384.             pointVal1 = 2
  385.  
  386.         ElseIf card1 = 42 Then
  387.  
  388.             PictureBox1.BackgroundImage = My.Resources._3diamonds
  389.             pointVal1 = 3
  390.  
  391.         ElseIf card1 = 43 Then
  392.  
  393.             PictureBox1.BackgroundImage = My.Resources._4diamonds
  394.             pointVal1 = 4
  395.  
  396.         ElseIf card1 = 44 Then
  397.  
  398.             PictureBox1.BackgroundImage = My.Resources._5diamonds
  399.             pointVal1 = 5
  400.  
  401.         ElseIf card1 = 45 Then
  402.  
  403.             PictureBox1.BackgroundImage = My.Resources._6diamonds
  404.             pointVal1 = 6
  405.  
  406.         ElseIf card1 = 46 Then
  407.  
  408.             PictureBox1.BackgroundImage = My.Resources._7diamonds
  409.             pointVal1 = 7
  410.  
  411.         ElseIf card1 = 47 Then
  412.  
  413.             PictureBox1.BackgroundImage = My.Resources._8diamonds
  414.             pointVal1 = 8
  415.  
  416.         ElseIf card1 = 48 Then
  417.  
  418.             PictureBox1.BackgroundImage = My.Resources._9diamonds
  419.             pointVal1 = 9
  420.  
  421.         ElseIf card1 = 49 Then
  422.  
  423.             PictureBox1.BackgroundImage = My.Resources._10diamonds
  424.             pointVal1 = 10
  425.  
  426.         ElseIf card1 = 50 Then
  427.  
  428.             PictureBox1.BackgroundImage = My.Resources.jackdiamonds
  429.             pointVal1 = 11
  430.  
  431.         ElseIf card1 = 51 Then
  432.  
  433.             PictureBox1.BackgroundImage = My.Resources.queendiamonds
  434.             pointVal1 = 12
  435.  
  436.         ElseIf card1 = 52 Then
  437.  
  438.             PictureBox1.BackgroundImage = My.Resources.kingdiamonds
  439.             pointVal1 = 13
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.             'this is the end of card1..
  450.        End If
  451.  
  452.  
  453.         'this is where you start card2 ...
  454.  
  455.  
  456.         If card2 = 1 Then
  457.  
  458.             PictureBox2.BackgroundImage = My.Resources.aceclubs
  459.             pointVal1 = 14
  460.  
  461.         ElseIf card2 = 2 Then
  462.  
  463.             PictureBox2.BackgroundImage = My.Resources._2clubs
  464.             pointVal1 = 2
  465.  
  466.         ElseIf card2 = 3 Then
  467.  
  468.             PictureBox2.BackgroundImage = My.Resources._3clubs
  469.             pointVal1 = 3
  470.  
  471.         ElseIf card2 = 4 Then
  472.  
  473.             PictureBox2.BackgroundImage = My.Resources._4clubs
  474.             pointVal1 = 4
  475.  
  476.         ElseIf card2 = 5 Then
  477.  
  478.             PictureBox2.BackgroundImage = My.Resources._5clubs
  479.             pointVal1 = 5
  480.  
  481.         ElseIf card2 = 6 Then
  482.  
  483.             PictureBox2.BackgroundImage = My.Resources._6clubs
  484.             pointVal1 = 6
  485.  
  486.         ElseIf card2 = 27 Then
  487.  
  488.             PictureBox2.BackgroundImage = My.Resources._7clubs
  489.             pointVal1 = 7
  490.  
  491.         ElseIf card2 = 8 Then
  492.  
  493.             PictureBox2.BackgroundImage = My.Resources._8clubs
  494.             pointVal1 = 8
  495.  
  496.         ElseIf card2 = 9 Then
  497.  
  498.             PictureBox2.BackgroundImage = My.Resources._9clubs
  499.             pointVal1 = 9
  500.  
  501.         ElseIf card2 = 10 Then
  502.  
  503.             PictureBox2.BackgroundImage = My.Resources._10clubs
  504.             pointVal1 = 10
  505.  
  506.         ElseIf card2 = 11 Then
  507.  
  508.             PictureBox2.BackgroundImage = My.Resources.jackclubs
  509.             pointVal1 = 11
  510.  
  511.         ElseIf card2 = 12 Then
  512.  
  513.             PictureBox2.BackgroundImage = My.Resources.queenclubs
  514.             pointVal1 = 12
  515.  
  516.         ElseIf card2 = 13 Then
  517.  
  518.             PictureBox2.BackgroundImage = My.Resources.kingclubs
  519.             pointVal1 = 13
  520.  
  521.         ElseIf card2 = 14 Then
  522.  
  523.             PictureBox2.BackgroundImage = My.Resources.acehearts
  524.  
  525.             pointVal1 = 14
  526.  
  527.         ElseIf card2 = 15 Then
  528.  
  529.             PictureBox2.BackgroundImage = My.Resources._2hearts
  530.             pointVal1 = 2
  531.  
  532.         ElseIf card2 = 16 Then
  533.  
  534.             PictureBox2.BackgroundImage = My.Resources._3hearts
  535.             pointVal1 = 3
  536.  
  537.         ElseIf card2 = 17 Then
  538.  
  539.             PictureBox2.BackgroundImage = My.Resources._4hearts
  540.             pointVal1 = 4
  541.  
  542.         ElseIf card2 = 18 Then
  543.  
  544.             PictureBox2.BackgroundImage = My.Resources._5hearts
  545.             pointVal1 = 5
  546.  
  547.         ElseIf card2 = 19 Then
  548.  
  549.             PictureBox2.BackgroundImage = My.Resources._6hearts
  550.             pointVal1 = 6
  551.  
  552.         ElseIf card2 = 20 Then
  553.  
  554.             PictureBox2.BackgroundImage = My.Resources._7hearts
  555.             pointVal1 = 7
  556.  
  557.         ElseIf card2 = 21 Then
  558.  
  559.             PictureBox2.BackgroundImage = My.Resources._8hearts
  560.             pointVal1 = 8
  561.  
  562.         ElseIf card2 = 22 Then
  563.  
  564.             PictureBox2.BackgroundImage = My.Resources._9hearts
  565.             pointVal1 = 9
  566.  
  567.         ElseIf card2 = 23 Then
  568.  
  569.             PictureBox2.BackgroundImage = My.Resources._10hearts
  570.             pointVal1 = 10
  571.  
  572.         ElseIf card2 = 24 Then
  573.  
  574.             PictureBox2.BackgroundImage = My.Resources.jackhearts
  575.             pointVal1 = 11
  576.  
  577.         ElseIf card2 = 25 Then
  578.  
  579.             PictureBox2.BackgroundImage = My.Resources.queenhearts
  580.             pointVal1 = 12
  581.  
  582.         ElseIf card2 = 26 Then
  583.  
  584.             PictureBox2.BackgroundImage = My.Resources.kinghearts
  585.             pointVal1 = 13
  586.  
  587.         ElseIf card2 = 27 Then
  588.  
  589.             PictureBox2.BackgroundImage = My.Resources.acespades
  590.             pointVal1 = 14
  591.  
  592.         ElseIf card2 = 28 Then
  593.  
  594.             PictureBox2.BackgroundImage = My.Resources._2spades
  595.             pointVal1 = 2
  596.  
  597.         ElseIf card2 = 29 Then
  598.  
  599.             PictureBox2.BackgroundImage = My.Resources._3spades
  600.             pointVal1 = 3
  601.  
  602.         ElseIf card2 = 30 Then
  603.  
  604.             PictureBox2.BackgroundImage = My.Resources._4spades
  605.             pointVal1 = 4
  606.  
  607.         ElseIf card2 = 31 Then
  608.  
  609.             PictureBox2.BackgroundImage = My.Resources._5spades
  610.             pointVal1 = 5
  611.  
  612.         ElseIf card2 = 32 Then
  613.  
  614.             PictureBox2.BackgroundImage = My.Resources._6spades
  615.             pointVal1 = 6
  616.  
  617.         ElseIf card2 = 33 Then
  618.  
  619.             PictureBox2.BackgroundImage = My.Resources._7spades
  620.             pointVal1 = 7
  621.  
  622.         ElseIf card2 = 34 Then
  623.  
  624.             PictureBox2.BackgroundImage = My.Resources._8spades
  625.             pointVal1 = 8
  626.  
  627.         ElseIf card2 = 35 Then
  628.  
  629.             PictureBox2.BackgroundImage = My.Resources._9spades
  630.             pointVal1 = 9
  631.  
  632.         ElseIf card2 = 36 Then
  633.  
  634.             PictureBox2.BackgroundImage = My.Resources._10spades
  635.             pointVal1 = 10
  636.  
  637.         ElseIf card2 = 37 Then
  638.  
  639.             PictureBox2.BackgroundImage = My.Resources.jackspades
  640.             pointVal1 = 11
  641.  
  642.         ElseIf card2 = 38 Then
  643.  
  644.             PictureBox2.BackgroundImage = My.Resources.queenspades
  645.             pointVal1 = 12
  646.  
  647.         ElseIf card2 = 39 Then
  648.  
  649.             PictureBox2.BackgroundImage = My.Resources.kingspades
  650.             pointVal1 = 13
  651.  
  652.         ElseIf card2 = 40 Then
  653.  
  654.             PictureBox2.BackgroundImage = My.Resources.acediamonds
  655.             pointVal1 = 14
  656.  
  657.         ElseIf card2 = 41 Then
  658.  
  659.             PictureBox2.BackgroundImage = My.Resources._2diamonds
  660.             pointVal1 = 2
  661.  
  662.         ElseIf card2 = 42 Then
  663.  
  664.             PictureBox2.BackgroundImage = My.Resources._3diamonds
  665.             pointVal1 = 3
  666.  
  667.         ElseIf card2 = 43 Then
  668.  
  669.             PictureBox2.BackgroundImage = My.Resources._4diamonds
  670.             pointVal1 = 4
  671.  
  672.         ElseIf card2 = 44 Then
  673.  
  674.             PictureBox2.BackgroundImage = My.Resources._5diamonds
  675.             pointVal1 = 5
  676.  
  677.         ElseIf card2 = 45 Then
  678.  
  679.             PictureBox2.BackgroundImage = My.Resources._6diamonds
  680.             pointVal1 = 6
  681.  
  682.         ElseIf card2 = 46 Then
  683.  
  684.             PictureBox2.BackgroundImage = My.Resources._7diamonds
  685.             pointVal1 = 7
  686.  
  687.         ElseIf card2 = 47 Then
  688.  
  689.             PictureBox2.BackgroundImage = My.Resources._8diamonds
  690.             pointVal1 = 8
  691.  
  692.         ElseIf card2 = 48 Then
  693.  
  694.             PictureBox2.BackgroundImage = My.Resources._9diamonds
  695.             pointVal1 = 9
  696.  
  697.         ElseIf card2 = 49 Then
  698.  
  699.             PictureBox2.BackgroundImage = My.Resources._10diamonds
  700.             pointVal1 = 10
  701.  
  702.         ElseIf card2 = 50 Then
  703.  
  704.             PictureBox2.BackgroundImage = My.Resources.jackdiamonds
  705.             pointVal1 = 11
  706.  
  707.         ElseIf card2 = 51 Then
  708.  
  709.             PictureBox2.BackgroundImage = My.Resources.queendiamonds
  710.             pointVal1 = 12
  711.  
  712.         ElseIf card2 = 52 Then
  713.  
  714.             PictureBox2.BackgroundImage = My.Resources.kingdiamonds
  715.             pointVal1 = 13
  716.  
  717.         End If
  718.  
  719.  
  720.         If (card1 > card2) Then
  721.             score1 = score1 + 2
  722.             lblP1Score.Text = (lblP1Score.Text + 2)
  723.         End If
  724.  
  725.         If (card2 > card1) Then
  726.             score2 = (score2 + 2)
  727.             lblP2Score.Text = (lblP2Score.Text + 2)
  728.         End If
  729.  
  730.  
  731.         If (card2 = card1) Then
  732.             score1 = (score1 + 1)
  733.             lblP1Score.Text = (lblP1Score.Text + 1)
  734.             score2 = (score2 + 1)
  735.             lblP2Score.Text = (lblP2Score.Text + 1)
  736.         End If
  737.  
  738.         If lblP1Score.Text = 0 Then
  739.             Label4.Text = ("Player 2 Wins")
  740.             Button1.Visible = (False)
  741.  
  742.         End If
  743.  
  744.             If lblP2Score.Text = 0 Then
  745.             Label4.Text = ("Player 1 Wins")
  746.             Button1.Visible = (False)
  747.  
  748.         End If
  749.  
  750.     End Sub
  751.  
  752.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  753.  
  754.         lblP1Score.Text = score1
  755.         lblP2Score.Text = score2
  756.  
  757.     End Sub
  758.  
  759.     Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
  760.  
  761.     End Sub
  762. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement