title: Cards 101 using VB
body: <p>Having a real difficult time with this. I have 2 stacks of cards.. user vs computer. The cards are dealt and properly displayed, that works just fine. Now the problem is how do I actually compare the 2 stacks of cards? So it the user gets say.. a "9" and the computer gets an "8", the user would get a point. There are 52 images loaded in with names like 'AceofClubs.png'. So, how can I give the respective image a value to compare? Thanks!</p>
  
  <pre><code>  Public Enum Suit
  Diamonds
  Spades
  Clubs
  Hearts
  </code></pre>
  
  <p>End Enum</p>
  
  <p>Public Enum FaceValue
      Two = 2
      Three = 3
      Four = 4
      Five = 5
      Six = 6
      Seven = 7
      Eight = 8
      Nine = 9
      Ten = 10
      Jack = 11
      Queen = 12
      King = 13
      Ace = 14
  End Enum</p>
  
  <p>Public Class Card
      Private ReadOnly faceVal As FaceValue
      Private isCardUp As Boolean
      Private ReadOnly suit As Suit</p>
  
  <pre><code>Public ReadOnly Property FaceVal As FaceValue
      Get
          Return Me.faceVal
      End Get
  End Property
  
  Public Property IsCardUp As Boolean
      Get
          Return Me.isCardUp
      End Get
      Set(ByVal value As Boolean)
          Me.isCardUp = value
      End Set
  End Property
  
  Public ReadOnly Property Suit As Suit
      Get
          Return Me.suit
      End Get
  End Property
  
  Public Sub New(ByVal suit As Suit, ByVal faceVal As FaceValue, ByVal isCardUp As Boolean)
      MyBase.New()
      Me.suit = suit
      Me.faceVal = faceVal
      Me.isCardUp = isCardUp
  End Sub
  
  Public Overrides Function ToString() As String 
      Return String.Concat("The", Me.faceVal.ToString(), "of", Me.suit.ToString())
  End Function
  </code></pre>
  
  <p>End Class</p>