Advertisement
LBASIC

4LEVEL.BAS

Jun 5th, 2023
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 1.20 KB | Cybersecurity | 0 0
  1. SCREEN 12
  2. RANDOMIZE TIMER
  3. TYPE XYCoordinates: x AS INTEGER: y AS INTEGER: END TYPE
  4. DIM shape(701) AS INTEGER, template(701) AS INTEGER
  5. DIM Position(2595) AS XYCoordinates
  6. FOR x% = 0 TO 2595
  7.   Position(x%).x = (x% MOD 59) * 10
  8.   Position(x%).y = (x% \ 59) * 10
  9. NEXT
  10. FOR x% = 1 TO 10000
  11.   Sw% = RND * 2595
  12.   SWAP Position(x% MOD 2596), Position(Sw%)
  13. NEXT
  14. LINE (0, 0)-(49, 49), RND * 15, BF
  15. x% = RND * 15
  16. CIRCLE (24, 24), 19, x%
  17. PAINT (24, 24), x%
  18. GET (0, 0)-(49, 49), template
  19. FOR x% = 0 TO 701: shape(x%) = template(x%): NEXT
  20. WHILE INKEY$ > "": WEND
  21. x% = 0
  22. DO
  23.   IF INKEY$ > "" THEN EXIT DO
  24.   SELECT CASE INT(RND * 4)
  25.     CASE 0: PUT (Position(x%).x, Position(x%).y), shape, PRESET
  26.     CASE 1: PUT (Position(x%).x, Position(x%).y), shape, PSET
  27.     CASE 2: PUT (Position(x%).x, Position(x%).y), shape, AND
  28.     CASE 3: PUT (Position(x%).x, Position(x%).y), shape, XOR
  29.     CASE 4: PUT (Position(x%).x, Position(x%).y), shape, OR
  30.   END SELECT
  31.   x% = x% + 1
  32.   x% = x% MOD 2596
  33.   IF x% = 0 THEN
  34.     SELECT CASE RND
  35.       CASE IS > .3
  36.         GET (53, 53)-(102, 102), shape
  37.       CASE ELSE
  38.         FOR x% = 0 TO 701: shape(x%) = template(x%): NEXT
  39.     END SELECT
  40.   END IF
  41. LOOP
  42. SCREEN 0: SYSTEM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement