Created
November 22, 2014 14:49
-
-
Save kreshikhin/ee4b253796ad11185555 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 REM From the ZX Spectrum manual on Drawing primitives | |
6 DIM x1, y1, x2, y2, c AS INTEGER | |
10 BORDER 0: PAPER 0: INK 7: CLS: REM turn screen blank | |
20 LET x1 = 0: LET y1 = 0: REM line start | |
30 LET c = 1: REM Ink color starting from blue | |
40 LET x2 = INT(RND * 256): LET y2 = INT(RND * 176): REM Random line end | |
50 DRAW INK c; x2 - x1, y2 - y1 | |
60 LET x1 = x2: LET y1 = y2: REM Next line starts at current one's ending | |
70 LET c = c + 1: IF c = 8 THEN LET c = 1: END IF: REM Next color | |
80 IF INKEY$ = "" THEN GOTO 40: END IF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment