File: KalRGB.kbs

package info (click to toggle)
basic256 0.9.6.69a-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,304 kB
  • sloc: cpp: 7,778; yacc: 926; lex: 575; sh: 21; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
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
27
28
29
30
31
32
  rem Kalidescope

cls
print "Press Q to stop."
clg
screenx = 300
screeny = 300
maxsize = 100

fastgraphics

draw:
x = int(rand * screenx)
y = int(rand * screeny)
z = int(rand * maxsize)	# size of box to draw on screen
colornumber = int(rand * 18)
gosub SETCOLOR
rect x, y, z, z
rect screenx - x - z, y, z, z		# draw mirror reflection on x axis
rect x, screeny - y - z, z, z		# draw mirror reflection on y axis
rect screenx - x - z, screeny - y - z, z, z	# draw mirror reflestion on both
refresh
if key = asc("Q") then end	# if user presses q then end
goto draw
end

SETCOLOR:
color int(rand*256), int(rand*256), int(rand*256)
return