Advertisement
mendozaa_

Untitled

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