Coding Challenge Thread

BlitzMax Forums/BlitzMax Programming/Coding Challenge Thread

This is not my submition just a little effect

Type Rect
	Field x
	Field y
End Type

Graphics 800,600,0

Local box:rect = New rect
box.x=100
box.y=100

While Not KeyHit(key_escape)

box.y:+1
Move(box.x,box.y,box.x)

If box.y=500 Then
box.y=0
End If

Flip
Wend
End

Function Move:Rect(x,y,xy)

Local obj:rect = New rect

obj.x:+x/2
obj.y:+y-xy/1

SetLineWidth( 10 )
SetColor Rand(255),Rand(255),Rand(255)
DrawLine obj.x,obj.y,obj.y,obj.x,True
DrawLine obj.x,obj.y,obj.y,obj.y,True
DrawLine obj.y,obj.x,obj.y,obj.y,True

End Function