Microsoft Small Basic

Program Listing: KFF238
' Design Your Original Car
' Copyright © 2016 Nonki Takahashi. The MIT License.
'
GraphicsWindow.Title = "Design Your Original Car"
Init()
' ground
GraphicsWindow.BrushColor = "Gray"
GraphicsWindow.FillRectangle(0, 400, gw, gh - 400)
' light
GraphicsWindow.BrushColor = "#99FFFFFF"
GraphicsWindow.FillEllipse(100, 250, 50, 50)
' top
GraphicsWindow.FillEllipse(250, 150, 200, 200)
' tail lump
GraphicsWindow.BrushColor = "#99FF0000"
GraphicsWindow.FillEllipse(500, 250, 50, 50)
' body
GraphicsWindow.BrushColor = "Red"
GraphicsWindow.FillEllipse(100, 250, 450, 100)
' wheels
GraphicsWindow.BrushColor = "#333333"
GraphicsWindow.FillEllipse(150, 300, 100, 100)
GraphicsWindow.FillEllipse(375, 300, 100, 100)
GraphicsWindow.BrushColor = "Silver"
GraphicsWindow.FillEllipse(170, 320, 60, 60)
GraphicsWindow.FillEllipse(395, 320, 60, 60)
' bumpers
GraphicsWindow.FillRectangle(100, 300, 50, 10)
GraphicsWindow.FillRectangle(500, 300, 50, 10)

Sub Init
gw = 598
gh = 428
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh
GraphicsWindow.BackgroundColor = "SkyBlue"
GraphicsWindow.BrushColor = "Gray"
DrawGrid()
GraphicsWindow.PenWidth = 0
EndSub

Sub DrawGrid
GraphicsWindow.PenColor = "#CCCCCC"
For y = 0 To gh Step 50
GraphicsWindow.DrawLine(0, y, gw, y)
EndFor
For x = 0 To gw Step 50
GraphicsWindow.DrawLine(x, 0, x, gh)
EndFor
GraphicsWindow.PenColor = "#999999"
For y = 0 To gh Step 100
GraphicsWindow.DrawLine(0, y, gw, y)
GraphicsWindow.DrawText(2, y + 2, y)
EndFor
For x = 0 To gw Step 100
GraphicsWindow.DrawLine(x, 0, x, gh)
GraphicsWindow.DrawText(x + 2, 2, x)
EndFor
EndSub