Microsoft Small Basic

Program Listing: JLP150
' Draw Quilt
' Version 0.1
' Copyright © 2017 Nonki Takahashi. The MIT License.

GraphicsWindow.Title = "Quilt 0.1"
gw = 598
gh = 428
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh
While "True"
For y = 0 To gh Step 100
For x = 0 To gw Step 100
DrawPattern100()
EndFor
EndFor
Program.Delay(2000)
EndWhile

Sub DrawPattern100
GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
GraphicsWindow.FillRectangle(x + 5, y + 5, 90, 90)
GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
GraphicsWindow.FillRectangle(x + 20, y + 20, 60, 60)
GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
GraphicsWindow.FillRectangle(x + 35, y + 35, 30, 30)
EndSub