VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsCar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private mTop As Integer
Private mLeft As Integer
Private mPosish As Integer
Private mOrient As Boolean
Private mSpeed As Integer
Private mColor As Integer
Private msTime As Integer

Public Property Let Top(ByVal vTop As Integer)
    mTop = vTop
End Property

Public Property Get Top() As Integer
    Top = mTop
End Property

Public Property Let Left(ByVal vLeft As Integer)
    mLeft = vLeft
End Property

Public Property Get Left() As Integer
    Left = mLeft
End Property

Public Property Let Posish(ByVal vPosish As Integer)
    mPosish = vPosish
End Property

Public Property Get Posish() As Integer
    Posish = mPosish
End Property
Public Property Let Orient(ByVal vOrient As Boolean)
    mOrient = vOrient
End Property
Public Property Get Orient() As Boolean
    Orient = mOrient
End Property
Public Property Let Speed(ByVal vSpeed As Integer)
    mSpeed = vSpeed
End Property
Public Property Get Speed() As Integer
    Speed = mSpeed
End Property
Public Property Let sTime(ByVal vsTime As Integer)
    msTime = vsTime
End Property
Public Property Get sTime() As Integer
    sTime = msTime
End Property
Public Property Let Color(ByVal vColor As String)
    mColor = 15
    If vColor = "yellow" Then mColor = 14
    If vColor = "red" Then mColor = 12
    If vColor = "purple" Then mColor = 13
End Property
Public Property Get Color() As String
    Color = "white"
    If mColor = 14 Then Color = "yellow"
    If mColor = 12 Then Color = "red"
    If mColor = 13 Then Color = "purple"
End Property

Public Sub DrawCar(Canvas As Object)
    Canvas.FillStyle = 0
    Canvas.FillColor = QBColor(mColor)
    If mOrient Then Canvas.Line (mLeft, mTop)-(mLeft + 90, mTop + 135), QBColor(mColor), B
    If Not mOrient Then Canvas.Line (mLeft, mTop)-(mLeft + 135, mTop + 90), QBColor(mColor), B
End Sub
Public Sub ClearCar(Canvas As Object)
    Canvas.FillStyle = 0
    Canvas.FillColor = QBColor(0)
    If mOrient Then Canvas.Line (mLeft, mTop)-(mLeft + 90, mTop + 135), QBColor(0), B
    If Not mOrient Then Canvas.Line (mLeft, mTop)-(mLeft + 135, mTop + 90), QBColor(0), B
End Sub
