Microsoft Small Basic

Program Listing: HZB686-0
GraphicsWindow.Width = 631
For i = 2 To (26*17) Step 17
For j = 2 To (37*17) Step 17
GraphicsWindow.FillRectangle(j, i, 15, 15)
d = Math.GetRandomNumber(2-(Math.Floor(2/i)+Math.Floor(2/j)))-1+(Math.Floor(2/j))
GraphicsWindow.FillRectangle(j+(-2 + 2*d), i-2*d, 15, 15)
EndFor
EndFor
GraphicsWindow.FillRectangle(614, 442, 15, 2)