Microsoft Small Basic

Program Listing: JCR763-0
w = 600
h = 400
GraphicsWindow.Width = w
GraphicsWindow.Height = h

GraphicsWindow.BackgroundColor = "black"

GraphicsWindow.FontSize = 30
GraphicsWindow.BrushColor = "white"
tb = Shapes.AddText("丸山プログラミング塾")
GraphicsWindow.BrushColor = "red"
t = Shapes.AddText("丸山プログラミング塾")

x=200
y=300
Shapes.Move(tb, x + 2, y + 2)
Shapes.Move(t, x, y)

Timer.Tick = Turn
Timer.Interval = 110

Sub Turn
x1 = Math.GetRandomNumber(w)
y1 = Math.GetRandomNumber(h)
'TextWindow.WriteLine(x1 + "-" + y1)
'Shapes.Animate(tb, x1, y1 , 10)
'Shapes.Animate(t, x1, y1 , 100)
Shapes.Move(tb, x1 + 2, y1 + 2)
Shapes.Move(t, x1, y1)

GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()
GraphicsWindow.DrawLine(x, y, x1, y1)
x = x1
y = y1
EndSub