summaryrefslogtreecommitdiff
path: root/algorithm/test.bmx
blob: 575c1d41f29cb5d34cca7ebfdad05f0a630fc368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
' $Id$

Import noddybox.algorithm

Const SCRW=800
Const SCRH=600

SetGraphicsDriver GLMax2DDriver()
Graphics SCRW,SCRH,32,60' Or HARDSYNC

While Not KeyHit(KEY_ESCAPE)
	'Cls
	
	Local l:TList=DoLine(Rand(0,SCRW),Rand(0,SCRH),Rand(0,SCRW),Rand(0,SCRH))
	
	For Local p:TAlgoPoint=EachIn l
		SetColor(Rand(100,255),Rand(100,255),Rand(100,255))
		Plot(p.x,p.y)
	Next
	
	Flip
	FlushMem
Wend

EndGraphics
End