Advertisement
bildnerj

Untitled

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