50 lines
1.2 KiB
VB.net
50 lines
1.2 KiB
VB.net
Public Class Card
|
|
Private Shared idCounter As Integer = 1
|
|
Private id As Integer
|
|
Private boxId As PictureBox
|
|
Private cardImage As Image
|
|
Private cardName As Tuple(Of String, String)
|
|
Private cardLocation As Point
|
|
Private cardHidden As Boolean
|
|
|
|
Public Sub New(name As Tuple(Of String, String), Optional hidden As Boolean = False)
|
|
id = idCounter
|
|
idCounter += 1
|
|
boxId = New PictureBox()
|
|
cardName = name
|
|
cardHidden = hidden
|
|
cardImage = Utilities.GetCardImage(name, hidden)
|
|
End Sub
|
|
|
|
Public Sub SetLocation(location As point)
|
|
cardLocation = location
|
|
End Sub
|
|
|
|
Public Sub SetName(name As Tuple(Of String, String))
|
|
cardName = name
|
|
End Sub
|
|
|
|
Public Sub SetHidden(hidden As Boolean)
|
|
cardHidden = hidden
|
|
End Sub
|
|
|
|
Public Function GetId() As Integer
|
|
Return id
|
|
End Function
|
|
|
|
Public Function GetBoxId() As PictureBox
|
|
Return boxId
|
|
End Function
|
|
|
|
Public Function GetName() As Tuple(Of String, String)
|
|
Return cardName
|
|
End Function
|
|
|
|
Public Function GetLocation() As Point
|
|
Return cardLocation
|
|
End Function
|
|
|
|
Public Function IsHidden() As Boolean
|
|
Return cardHidden
|
|
End Function
|
|
End Class |