Author Topic: MAZEBALL: Tilt Maze puzzle clone  (Read 6633 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #15 on: August 23, 2020, 11:16:04 pm »
I finally have an AI that can solve all 10 puzzles! It even found an alternate to puzzle #2.

I want to illustrate solutions before posting code.

Also this fixes the line in the Star, there is probably other ways but I like to advertize Rotozoom3 that has advantage of rotating or scaling on x, y axis independently.
Nice effect with Star BTW!

Just needed to add _SEAMLESS
Code: QB64: [Select]
  1.  
  2. SUB RotoZoom (X AS LONG, Y AS LONG, Image AS LONG, Scale AS SINGLE, Rotation AS SINGLE)
  3.     DIM px(3) AS SINGLE: DIM py(3) AS SINGLE
  4.     W& = _WIDTH(Image&): H& = _HEIGHT(Image&)
  5.     px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
  6.     px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
  7.     sinr! = SIN(-Rotation / 57.2957795131): cosr! = COS(-Rotation / 57.2957795131)
  8.     FOR i& = 0 TO 3
  9.         x2& = (px(i&) * cosr! + sinr! * py(i&)) * Scale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * Scale + Y
  10.         px(i&) = x2&: py(i&) = y2&
  11.     NEXT
  12.     _MAPTRIANGLE _SEAMLESS(0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
  13.     _MAPTRIANGLE _SEAMLESS(0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
  14.  
  15.  
  16.  
« Last Edit: August 23, 2020, 11:26:04 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #16 on: August 24, 2020, 01:41:48 am »
Illustrated Solutions, just hit the arrow key you land on :)

Pathfinder takes just under a minute for #9 and #10, the rest are pretty quick.

Code: QB64: [Select]
  1. _TITLE "Tilt Maze Pathfinder" ' b+ started 2020-08-22
  2. ' 2020-08-22 I am starting with mods of Dav's version of tilt maze as it was frustration
  3. ' with the his 2nd level Puzzle that inspired me to search for solutions with AI.
  4. ' Thanks for that Dav! ;-))
  5. ' 2020-08-22 so far just a semi-3D version.
  6. ' 2020-08-23 It now can solve all the puzzles, #9, #10 are taking almost a minute though.
  7. ' 2020-08-24 Illustrate solutions
  8.  
  9.  
  10. '============
  11. 'MAZEBALL.BAS   https://www.qb64.org/forum/index.php?topic=2936.msg121950#msg121950  original post
  12. '============
  13. 'Clone of the Tilt Maze Puzzle games.
  14. 'QB64 code by Dav, AUG/2020
  15.  
  16. 'The goal is to move the ball to the star.
  17. 'Use arrows to move the ball.  Walls will stop
  18. 'the ball moving so navigate around them.
  19. 'There are 10 levels to complete and they get
  20. 'harder as you go.  To help you (cheat) you can
  21. 'jump to other levels by using the +/- keys.
  22. 'Press SPACE to reset level and start over.
  23.  
  24. 'If you beat the last level, you will get a
  25. 'smiley face and hear a happy song.
  26.  
  27. 'For those who get stuck, solutions are below.
  28.  
  29. '=======
  30. 'CREDITS:
  31. '=======
  32.  
  33. 'I didn't come up with this game - It's been around for a while.
  34. 'It's mostly a clone of a cool game posted on THE QBASIC FORUM here:
  35. 'https://www.tapatalk.com/groups/qbasic/tilting-maz-game-t39133.html
  36. 'Also some levels derived from the original tilt maze game here:
  37. 'https://www.mathsisfun.com/games/tilt-maze.html
  38. 'There's other Tilt Maze games that influenced me.
  39.  
  40. 'My thanks to those original game authors for the tilt maze fun.
  41. 'Please accept this QB64 version as a compliment from a fan.
  42.  
  43. '=================================================================
  44.  
  45. 'Solutions below, for those who get stuck...
  46.  
  47. '#1)  RDLURDR
  48. '#2)  LURULDRUL
  49. '#3)  DRULDRDLULUR
  50. '#4)  DRURULURULDR
  51. '#5)  URDLULDLURDLU
  52. '#6)  RDRULDRULDRD
  53. '#7)  DRULDLURDRULDRD
  54. '#8)  RDLDLULDLURURULDRD
  55. '#9)  LURULULDLDRDRURULURDLDR
  56. '#10) D R U L D L D R U R U L U L U R D L U R D R U L D R U R D
  57.  
  58. TYPE xy
  59.     x AS INTEGER
  60.     y AS INTEGER
  61.  
  62. TYPE d4way ' clock wise
  63.     d1 AS xy 'right
  64.     d2 AS xy 'down y increasing
  65.     d3 AS xy 'left
  66.     d4 AS xy 'up y decrease
  67.  
  68. DIM SHARED bs, grid 'box or cell size, cells per side of square grid
  69. DIM SHARED bx, by, sx, sy 'ball and star locations
  70. DIM SHARED TruePath$, soln& ' AI found a path to Star, handle for solution screen
  71. REDIM SHARED pdata$(grid, grid), AI(grid, grid) AS d4way
  72. puzzle = 1 'start on puzzle 1
  73. puzzlemax = 10 'there are 10 puzzles total
  74.  
  75. SCREEN _NEWIMAGE(640, 640, 32)
  76. _DELAY .25
  77.  
  78. 'check arrow
  79. 'arrow 320, 320, 0, 200
  80. 'END
  81. '======
  82. restart:
  83. _TITLE "Level: " + STR$(puzzle) + " of" + STR$(puzzlemax)
  84. setLevel puzzle
  85. updateBall
  86.     CLS
  87.     'get user keypress...
  88.     k$ = INKEY$
  89.     moved = 0: done = 0
  90.  
  91.     'if right arrow....
  92.     IF k$ = CHR$(0) + CHR$(77) THEN 'right
  93.         WHILE pdata$(bx + 1, by) = " " OR pdata$(bx + 1, by) = "y"
  94.             bx = bx + 1: moved = 1
  95.             IF bx = sx AND by = sy THEN done = 1: EXIT WHILE
  96.         WEND
  97.     END IF
  98.     'if left arrow...
  99.     IF k$ = CHR$(0) + CHR$(75) THEN
  100.         WHILE pdata$(bx - 1, by) = " " OR pdata$(bx - 1, by) = "y"
  101.             bx = bx - 1: moved = 1
  102.             IF bx = sx AND by = sy THEN done = 1: EXIT WHILE
  103.         WEND
  104.     END IF
  105.  
  106.     'down arrow
  107.     IF k$ = CHR$(0) + CHR$(80) THEN
  108.         WHILE pdata$(bx, by + 1) = " " OR pdata$(bx, by + 1) = "y"
  109.             by = by + 1: moved = 1
  110.             IF bx = sx AND by = sy THEN done = 1: EXIT WHILE
  111.         WEND
  112.     END IF
  113.  
  114.     'if up arrow
  115.     IF k$ = CHR$(0) + CHR$(72) THEN
  116.         WHILE pdata$(bx, by - 1) = " " OR pdata$(bx, by - 1) = "y"
  117.             by = by - 1: moved = 1
  118.             IF bx = sx AND by = sy THEN done = 1: EXIT WHILE
  119.         WEND
  120.     END IF
  121.  
  122.     IF k$ = CHR$(32) THEN GOTO restart
  123.  
  124.     IF k$ = "+" THEN
  125.         puzzle = puzzle + 1: IF puzzle > puzzlemax THEN puzzle = 1
  126.         GOTO restart
  127.     END IF
  128.  
  129.     IF k$ = "-" THEN
  130.         puzzle = puzzle - 1: IF puzzle < 1 THEN puzzle = puzzlemax
  131.         GOTO restart
  132.     END IF
  133.     updateBall
  134.     _DISPLAY
  135.     _LIMIT 60
  136.     IF done = 1 THEN
  137.         SOUND 7000, .1: _DELAY 2
  138.         puzzle = puzzle + 1
  139.         IF puzzle > puzzlemax THEN puzzle = 1
  140.         GOTO restart
  141.     END IF
  142.  
  143. SUB update
  144.     CLS
  145.     FOR y = grid - 1 TO 0 STEP -1
  146.         FOR x = grid - 1 TO 0 STEP -1
  147.             IF pdata$(x, y) = "x" THEN
  148.                 LINE (x * bs, y * bs)-STEP(bs - 1, bs - 1), _RGB32(144, 0, 0), BF
  149.                 LINE (x * bs, y * bs)-STEP(bs - 1, bs - 1), &HFF999999, B
  150.             ELSEIF x = bx AND y = by AND TruePath$ = "" THEN
  151.                 'LINE (x * bs, y * bs)-STEP(bs - 1, bs - 1), &HFF000000, BF
  152.                 FOR R! = .47 * bs TO 0 STEP -1
  153.                     fcirc x * bs + .5 * bs, y * bs + .5 * bs, R!, _RGB32(220 - 220 * R! / (.45 * bs) + 35)
  154.                 NEXT
  155.             ELSEIF x = sx AND y = sy THEN
  156.                 'LINE (x * bs, y * bs)-STEP(bs - 1, bs - 1), &HFF000000, BF
  157.                 FOR p = 1 TO 0 STEP -.0125
  158.                     star x * bs + .5 * bs, y * bs + .5 * bs, .16 * bs * p, .46 * bs * p, 5, _PI / 10, _RGB32(255, (1 - p) * 150 + 105, 0)
  159.                 NEXT
  160.             END IF
  161.         NEXT
  162.     NEXT
  163.  
  164. SUB updateBall
  165.     IF TruePath$ <> "" THEN
  166.         _PUTIMAGE , soln&, 0
  167.         FOR R! = .47 * bs TO 0 STEP -1
  168.             fcirc bx * bs + .5 * bs, by * bs + .5 * bs, R!, _RGB32(220 - 220 * R! / (.45 * bs) + 35)
  169.         NEXT
  170.     ELSE
  171.         update
  172.     END IF
  173.  
  174. SUB setLevel (puzzle) 'x is the wall, b is ball. y is the star
  175.     IF puzzle = 1 THEN
  176.         puz$ = "": grid = 8
  177.         puz$ = puz$ + "xxxxxxxx"
  178.         puz$ = puz$ + "x   xb x"
  179.         puz$ = puz$ + "x   yx x"
  180.         puz$ = puz$ + "x  xx  x"
  181.         puz$ = puz$ + "x      x"
  182.         puz$ = puz$ + "x      x"
  183.         puz$ = puz$ + "x      x"
  184.         puz$ = puz$ + "xxxxxxxx"
  185.     ELSEIF puzzle = 2 THEN
  186.         puz$ = "": grid = 10
  187.         puz$ = puz$ + "xxxxxxxxxx"
  188.         puz$ = puz$ + "xx  x    x"
  189.         puz$ = puz$ + "x   xx   x"
  190.         puz$ = puz$ + "x   y    x"
  191.         puz$ = puz$ + "x     xx x"
  192.         puz$ = puz$ + "x      b x"
  193.         puz$ = puz$ + "x        x"
  194.         puz$ = puz$ + "x     xx x"
  195.         puz$ = puz$ + "x x      x"
  196.         puz$ = puz$ + "xxxxxxxxxx"
  197.     ELSEIF puzzle = 3 THEN
  198.         puz$ = "": grid = 11
  199.         puz$ = puz$ + "xxxxxxxxxxx"
  200.         puz$ = puz$ + "xbx  x    x"
  201.         puz$ = puz$ + "x    x    x"
  202.         puz$ = puz$ + "xx   x    x"
  203.         puz$ = puz$ + "x    y  x x"
  204.         puz$ = puz$ + "x    x    x"
  205.         puz$ = puz$ + "x         x"
  206.         puz$ = puz$ + "x x     x x"
  207.         puz$ = puz$ + "x  x      x"
  208.         puz$ = puz$ + "x   x    xx"
  209.         puz$ = puz$ + "xxxxxxxxxxx"
  210.     ELSEIF puzzle = 4 THEN
  211.         bs = INT(sw / 11) 'boxsize
  212.         puz$ = "": grid = 11
  213.         puz$ = puz$ + "xxxxxxxxxxx"
  214.         puz$ = puz$ + "xbx   x   x"
  215.         puz$ = puz$ + "x xx      x"
  216.         puz$ = puz$ + "x         x"
  217.         puz$ = puz$ + "x       xxx"
  218.         puz$ = puz$ + "x x       x"
  219.         puz$ = puz$ + "x x  xx   x"
  220.         puz$ = puz$ + "x         x"
  221.         puz$ = puz$ + "x xx  x xxx"
  222.         puz$ = puz$ + "x     x  yx"
  223.         puz$ = puz$ + "xxxxxxxxxxx"
  224.     ELSEIF puzzle = 5 THEN
  225.         puz$ = "": grid = 12
  226.         puz$ = puz$ + "xxxxxxxxxxxx"
  227.         puz$ = puz$ + "x x      x x"
  228.         puz$ = puz$ + "x x xxx  x x"
  229.         puz$ = puz$ + "x          x"
  230.         puz$ = puz$ + "x x x x xx x"
  231.         puz$ = puz$ + "x x xbx    x"
  232.         puz$ = puz$ + "x   xxxxx xx"
  233.         puz$ = puz$ + "x     xyx  x"
  234.         puz$ = puz$ + "xx         x"
  235.         puz$ = puz$ + "x         xx"
  236.         puz$ = puz$ + "x   x x    x"
  237.         puz$ = puz$ + "xxxxxxxxxxxx"
  238.     ELSEIF puzzle = 6 THEN
  239.         puz$ = "": grid = 13
  240.         puz$ = puz$ + "xxxxxxxxxxxxx"
  241.         puz$ = puz$ + "x     x     x"
  242.         puz$ = puz$ + "x   xxx   xxx"
  243.         puz$ = puz$ + "x           x"
  244.         puz$ = puz$ + "xxx xxx   x x"
  245.         puz$ = puz$ + "x         xyx"
  246.         puz$ = puz$ + "xb    x   xxx"
  247.         puz$ = puz$ + "x x   x     x"
  248.         puz$ = puz$ + "xxx   xx    x"
  249.         puz$ = puz$ + "x           x"
  250.         puz$ = puz$ + "x   x   x x x"
  251.         puz$ = puz$ + "x   x   x x x"
  252.         puz$ = puz$ + "xxxxxxxxxxxxx"
  253.     ELSEIF puzzle = 7 THEN
  254.         puz$ = "": grid = 15
  255.         puz$ = puz$ + "xxxxxxxxxxxxxxx"
  256.         puz$ = puz$ + "xbx   x     x x"
  257.         puz$ = puz$ + "x xx          x"
  258.         puz$ = puz$ + "x         x   x"
  259.         puz$ = puz$ + "xx       xx   x"
  260.         puz$ = puz$ + "x             x"
  261.         puz$ = puz$ + "x xx       xx x"
  262.         puz$ = puz$ + "x     x x     x"
  263.         puz$ = puz$ + "xx            x"
  264.         puz$ = puz$ + "x   x         x"
  265.         puz$ = puz$ + "x   xx       xx"
  266.         puz$ = puz$ + "x       x     x"
  267.         puz$ = puz$ + "x      xxx    x"
  268.         puz$ = puz$ + "x x         xyx"
  269.         puz$ = puz$ + "xxxxxxxxxxxxxxx"
  270.     ELSEIF puzzle = 8 THEN
  271.         puz$ = "": grid = 15
  272.         puz$ = puz$ + "xxxxxxxxxxxxxxx"
  273.         puz$ = puz$ + "x x     x     x"
  274.         puz$ = puz$ + "x    x       xx"
  275.         puz$ = puz$ + "x        b    x"
  276.         puz$ = puz$ + "x     x     x x"
  277.         puz$ = puz$ + "x  x          x"
  278.         puz$ = puz$ + "x       x x   x"
  279.         puz$ = puz$ + "x      xx    xx"
  280.         puz$ = puz$ + "x             x"
  281.         puz$ = puz$ + "xx       x    x"
  282.         puz$ = puz$ + "x   x x       x"
  283.         puz$ = puz$ + "x   xyx       x"
  284.         puz$ = puz$ + "x   xxx       x"
  285.         puz$ = puz$ + "x       x   x x"
  286.         puz$ = puz$ + "xxxxxxxxxxxxxxx"
  287.     ELSEIF puzzle = 9 THEN
  288.         puz$ = "": grid = 19
  289.         puz$ = puz$ + "xxxxxxxxxxxxxxxxxxx"
  290.         puz$ = puz$ + "x x   x       x   x"
  291.         puz$ = puz$ + "x x   xxx   x x xxx"
  292.         puz$ = puz$ + "x           x     x"
  293.         puz$ = puz$ + "x xxx xxxxx xxx x x"
  294.         puz$ = puz$ + "x   x   x       x x"
  295.         puz$ = puz$ + "xxx x   x   x   x x"
  296.         puz$ = puz$ + "x           x     x"
  297.         puz$ = puz$ + "x   xxx x xxx xxx x"
  298.         puz$ = puz$ + "x     x x         x"
  299.         puz$ = puz$ + "xxx   x xxx     x x"
  300.         puz$ = puz$ + "x       x       x x"
  301.         puz$ = puz$ + "x x x   x xxx   xxx"
  302.         puz$ = puz$ + "x x x             x"
  303.         puz$ = puz$ + "x x x xxx x   x   x"
  304.         puz$ = puz$ + "x         x   x   x"
  305.         puz$ = puz$ + "x xxx     x x xxx x"
  306.         puz$ = puz$ + "x  bx       x  yx x"
  307.         puz$ = puz$ + "xxxxxxxxxxxxxxxxxxx"
  308.     ELSEIF puzzle = 10 THEN
  309.         puz$ = "": grid = 21
  310.         puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxxx"
  311.         puz$ = puz$ + "xbx x     x   x     x"
  312.         puz$ = puz$ + "x x x     x   xxx   x"
  313.         puz$ = puz$ + "x x                 x"
  314.         puz$ = puz$ + "x x xxx x x     x   x"
  315.         puz$ = puz$ + "x       x x     x   x"
  316.         puz$ = puz$ + "x   x   x x     x xxx"
  317.         puz$ = puz$ + "x   x               x"
  318.         puz$ = puz$ + "x   x     x xxx x   x"
  319.         puz$ = puz$ + "x         x     x   x"
  320.         puz$ = puz$ + "xxx xxx xxxxx xxx xxx"
  321.         puz$ = puz$ + "x         x         x"
  322.         puz$ = puz$ + "x   xxx   x x xxx x x"
  323.         puz$ = puz$ + "x           x     x x"
  324.         puz$ = puz$ + "xxx xxx   x xxx   x x"
  325.         puz$ = puz$ + "x   x     x x     x x"
  326.         puz$ = puz$ + "x x x xxx x x   x x x"
  327.         puz$ = puz$ + "x x             x   x"
  328.         puz$ = puz$ + "x x     x x x   x x x"
  329.         puz$ = puz$ + "x       x x x     xyx"
  330.         puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxxx"
  331.     END IF
  332.     REDIM pdata$(grid - 1, grid - 1) 'from text to 2d array
  333.     m = 1
  334.     FOR y = 0 TO grid - 1
  335.         FOR x = 0 TO grid - 1
  336.             pdata$(x, y) = MID$(puz$, m, 1)
  337.             IF MID$(puz$, m, 1) = "y" THEN sx = x: sy = y
  338.             IF MID$(puz$, m, 1) = "b" THEN bx = x: by = y
  339.             m = m + 1
  340.         NEXT
  341.     NEXT
  342.     bs = _WIDTH \ grid
  343.     REDIM AI(grid, grid) AS d4way 'initialize to 0
  344.     FOR y = 0 TO grid - 1
  345.         FOR x = 0 TO grid - 1
  346.             AI(x, y).d1.x = 0
  347.             AI(x, y).d1.y = 0
  348.             AI(x, y).d2.x = 0
  349.             AI(x, y).d2.y = 0
  350.             AI(x, y).d3.x = 0
  351.             AI(x, y).d3.y = 0
  352.             AI(x, y).d4.x = 0
  353.             AI(x, y).d4.y = 0
  354.         NEXT
  355.     NEXT
  356.     'now load AI
  357.     FOR y = 1 TO grid - 2
  358.         FOR x = 1 TO grid - 2
  359.             'CLS
  360.             'LOCATE 1, 1: PRINT x, y
  361.             IF pdata$(x, y) = " " OR pdata$(x, y) = "b" THEN
  362.                 tx = x: ty = y: moved = 0: done = 0 'right  d1
  363.                 WHILE pdata$(tx + 1, ty) = " " OR pdata$(tx + 1, ty) = "y" OR pdata$(tx + 1, ty) = "b"
  364.                     tx = tx + 1: moved = 1
  365.                     IF tx = sx AND ty = sy THEN done = 1: EXIT WHILE
  366.                 WEND
  367.                 IF moved = 1 OR done = 1 THEN AI(x, y).d1.x = tx: AI(x, y).d1.y = ty
  368.  
  369.                 tx = x: ty = y: moved = 0: done = 0 'down arrow  d2
  370.                 WHILE pdata$(tx, ty + 1) = " " OR pdata$(tx, ty + 1) = "y" OR pdata$(tx, ty + 1) = "b"
  371.                     ty = ty + 1: moved = 1
  372.                     IF tx = sx AND ty = sy THEN done = 1: EXIT WHILE
  373.                 WEND
  374.                 IF moved = 1 OR done = 1 THEN AI(x, y).d2.x = tx: AI(x, y).d2.y = ty
  375.  
  376.                 tx = x: ty = y: moved = 0: done = 0 'left d3
  377.                 WHILE pdata$(tx - 1, ty) = " " OR pdata$(tx - 1, ty) = "y" OR pdata$(tx - 1, ty) = "b"
  378.                     tx = tx - 1: moved = 1
  379.                     IF tx = sx AND ty = sy THEN done = 1: EXIT WHILE
  380.                 WEND
  381.                 IF moved = 1 OR done = 1 THEN AI(x, y).d3.x = tx: AI(x, y).d3.y = ty
  382.  
  383.                 tx = x: ty = y: moved = 0: done = 0 'if up arrow d4
  384.                 WHILE pdata$(tx, ty - 1) = " " OR pdata$(tx, ty - 1) = "y" OR pdata$(tx, ty - 1) = "b"
  385.                     ty = ty - 1: moved = 1
  386.                     IF tx = sx AND ty = sy THEN done = 1: EXIT WHILE
  387.                 WEND
  388.                 IF moved = 1 OR done = 1 THEN AI(x, y).d4.x = tx: AI(x, y).d4.y = ty
  389.             END IF
  390.             'PRINT
  391.             'PRINT AI(x, y).d1.x, AI(x, y).d1.y
  392.             'PRINT AI(x, y).d2.x, AI(x, y).d2.y
  393.             'PRINT AI(x, y).d3.x, AI(x, y).d3.y
  394.             'PRINT AI(x, y).d4.x, AI(x, y).d4.y
  395.  
  396.             'PRINT
  397.             'INPUT "Ok  press eneter "; w$
  398.  
  399.         NEXT
  400.     NEXT
  401.     TruePath$ = "" 'clear last stuff
  402.     CLS
  403.     PRINT "Pathfinding... please wait"
  404.     _DISPLAY
  405.     explore bx, by, "D", ""
  406.     IF TruePath$ <> "" THEN
  407.         'CLS
  408.         'PRINT TruePath$ 'before trying to retrace it let's see what it looks like
  409.         'PRINT
  410.         'PRINT "press any but spacebar to continue... and again after pic"
  411.         '_AUTODISPLAY
  412.         'SLEEP
  413.         'drawit
  414.         update
  415.         REDIM tp$(0)
  416.         Split TruePath$, ",", tp$()
  417.         'CLS
  418.         FOR i = 0 TO UBOUND(tp$) - 2 STEP 3
  419.             x = VAL(tp$(i)): y = VAL(tp$(i + 1)): d$ = tp$(i + 2)
  420.             'PRINT " >"; x, y, d$;
  421.  
  422.             SELECT CASE d$
  423.                 CASE "R": arrow x * bs + bs + .25 * bs, y * bs + .5 * bs, 0, 1.25 * bs
  424.                 CASE "D": arrow x * bs + .5 * bs, y * bs + bs + .25 * bs, _PI / 2, 1.25 * bs
  425.                 CASE "L": arrow x * bs - .25 * bs, y * bs + .5 * bs, _PI, 1.25 * bs
  426.                 CASE "U": arrow x * bs + .5 * bs, y * bs - .25 * bs, _PI(3 / 2), 1.25 * bs
  427.             END SELECT
  428.         NEXT
  429.         _DISPLAY
  430.         soln& = _NEWIMAGE(_WIDTH, _HEIGHT, 32)
  431.         _PUTIMAGE , 0, soln&
  432.  
  433.     ELSE
  434.         CLS
  435.         PRINT "Sorry, did not find a path."
  436.         PRINT
  437.         PRINT "press any but spacebar to continue..."
  438.         _DISPLAY
  439.         SLEEP
  440.     END IF
  441.  
  442. ' using AI(x, y) dim'd as d4ways to bounce around the maze
  443. SUB explore (cx, cy, cdir$, cmyPath$) 'recursive explore until stuck in loop or hit target
  444.     IF TruePath$ <> "" THEN EXIT SUB
  445.  
  446.     'will this new test be better than looking for single repeating nodes?
  447.     IF duplicate(cmyPath$) THEN EXIT SUB ' a repeated line between 2 nodes
  448.  
  449.  
  450.     'debug watch ball
  451.     'CLS
  452.     'bx = cx: by = cy
  453.     'update
  454.     'PRINT "explore"; cx; cy; cdir$; ", "; cmyPath$
  455.     '_DISPLAY
  456.     'INPUT "Ok press eneter "; w$
  457.  
  458.  
  459.     x = cx: y = cy: dir$ = cdir$: myPath$ = cmyPath$ 'private copies of everything
  460.     IF x = sx AND y = sy THEN ' found our target add it to end of myPath$  and go home
  461.         TruePath$ = myPath$ + "," + TS$(x) + "," + TS$(y) 'stop found star
  462.         EXIT SUB 'yeah!
  463.     ELSE 'continue on unless we've been here before
  464.         IF myPath$ = "" THEN 'this is start point of myPath$ so can go any of 4 directions as long as AI(x, y) direction point is not 0,0
  465.             FOR i = 1 TO 4
  466.                 dr$ = MID$("RDLU", i, 1)
  467.                 myPath$ = TS$(x) + "," + TS$(y) + "," + dr$
  468.                 IF i = 1 THEN
  469.                     IF AI(x, y).d1.x <> 0 AND AI(x, y).d1.y <> 0 THEN
  470.                         explore AI(x, y).d1.x, AI(x, y).d1.y, "U", myPath$
  471.                         explore AI(x, y).d1.x, AI(x, y).d1.y, "D", myPath$
  472.                     END IF
  473.                 ELSEIF i = 2 THEN
  474.                     IF AI(x, y).d2.x <> 0 AND AI(x, y).d2.y <> 0 THEN
  475.                         explore AI(x, y).d2.x, AI(x, y).d2.y, "R", myPath$
  476.                         explore AI(x, y).d2.x, AI(x, y).d2.y, "L", myPath$
  477.                     END IF
  478.                 ELSEIF i = 3 THEN
  479.                     IF AI(x, y).d3.x <> 0 AND AI(x, y).d3.y <> 0 THEN
  480.                         explore AI(x, y).d3.x, AI(x, y).d3.y, "D", myPath$
  481.                         explore AI(x, y).d3.x, AI(x, y).d3.y, "U", myPath$
  482.                     END IF
  483.                 ELSEIF i = 4 THEN
  484.                     IF AI(x, y).d4.x <> 0 AND AI(x, y).d4.y <> 0 THEN
  485.                         explore AI(x, y).d4.x, AI(x, y).d4.y, "L", myPath$
  486.                         explore AI(x, y).d4.x, AI(x, y).d4.y, "R", myPath$
  487.                     END IF
  488.                 END IF
  489.             NEXT
  490.         ELSE 'there is one direction we can't
  491.             'find$ = TS$(x) + "," + TS$(y) ' this solves many puzzles but not all 6, 8, 10 bug out lost 9
  492.  
  493.             'find$ = TS$(x) + "," + TS$(y) + "," + dir$ 'still trying to get all puzzles solved  bugs out except for 6
  494.             'find$ = dir$ + "," + TS$(x) + "," + TS$(y) '<<<<<<<<<<<<<<<<< this is disaster! bugs out
  495.             'p = INSTR(myPath$, find$)
  496.             'IF p > 0 THEN
  497.             '    c = 1
  498.             '    WHILE p
  499.             '        c = c + 1
  500.             '        p = INSTR(p + 1, myPath$, find$)
  501.             '    WEND
  502.             '    IF c > 3 THEN EXIT SUB
  503.             'END IF
  504.             'ELSE 'carry on
  505.  
  506.  
  507.             'Have we been here before search my path for x, y, dir$
  508.             myPath$ = myPath$ + "," + TS$(x) + "," + TS$(y)
  509.             FOR i = 1 TO 4
  510.                 dr$ = MID$("RDLU", i, 1)
  511.                 IF i = 1 AND dir$ <> "U" AND dir$ <> "D" THEN
  512.                     IF AI(x, y).d1.x <> 0 AND AI(x, y).d1.y <> 0 THEN
  513.                         explore AI(x, y).d1.x, AI(x, y).d1.y, "D", myPath$ + "," + dr$
  514.                         explore AI(x, y).d1.x, AI(x, y).d1.y, "U", myPath$ + "," + dr$
  515.                     END IF
  516.                 ELSEIF i = 2 AND dir$ <> "L" AND dir$ <> "R" THEN
  517.                     IF AI(x, y).d2.x <> 0 AND AI(x, y).d2.y <> 0 THEN
  518.                         explore AI(x, y).d2.x, AI(x, y).d2.y, "L", myPath$ + "," + dr$
  519.                         explore AI(x, y).d2.x, AI(x, y).d2.y, "R", myPath$ + "," + dr$
  520.                     END IF
  521.                 ELSEIF i = 3 AND dir$ <> "U" AND dir$ <> "D" THEN
  522.                     IF AI(x, y).d3.x <> 0 AND AI(x, y).d3.y <> 0 THEN
  523.                         explore AI(x, y).d3.x, AI(x, y).d3.y, "U", myPath$ + "," + dr$
  524.                         explore AI(x, y).d3.x, AI(x, y).d3.y, "D", myPath$ + "," + dr$
  525.                     END IF
  526.                 ELSEIF i = 4 AND dir$ <> "L" AND dir$ <> "R" THEN
  527.                     IF AI(x, y).d4.x <> 0 AND AI(x, y).d4.y <> 0 THEN
  528.                         explore AI(x, y).d4.x, AI(x, y).d4.y, "R", myPath$ + "," + dr$
  529.                         explore AI(x, y).d4.x, AI(x, y).d4.y, "L", myPath$ + "," + dr$
  530.                     END IF
  531.                 END IF
  532.             NEXT
  533.         END IF
  534.     END IF
  535.     'END IF
  536.  
  537. SUB fcirc (CX AS INTEGER, CY AS INTEGER, R AS INTEGER, C AS _UNSIGNED LONG)
  538.     DIM Radius AS INTEGER, RadiusError AS INTEGER
  539.     DIM X AS INTEGER, Y AS INTEGER
  540.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  541.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  542.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  543.     WHILE X > Y
  544.         RadiusError = RadiusError + Y * 2 + 1
  545.         IF RadiusError >= 0 THEN
  546.             IF X <> Y + 1 THEN
  547.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  548.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  549.             END IF
  550.             X = X - 1
  551.             RadiusError = RadiusError - X * 2
  552.         END IF
  553.         Y = Y + 1
  554.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  555.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  556.     WEND
  557.  
  558. SUB ftri (x1, y1, x2, y2, x3, y3, K AS _UNSIGNED LONG)
  559.     DIM D AS LONG
  560.     STATIC a&
  561.     D = _DEST
  562.     IF a& = 0 THEN a& = _NEWIMAGE(1, 1, 32)
  563.     _DEST a&
  564.     _DONTBLEND a& '  '<<<< new 2019-12-16 fix
  565.     PSET (0, 0), K
  566.     _BLEND a& '<<<< new 2019-12-16 fix
  567.     _DEST D
  568.     _MAPTRIANGLE _SEAMLESS(0, 0)-(0, 0)-(0, 0), a& TO(x1, y1)-(x2, y2)-(x3, y3)
  569.  
  570. SUB star (x, y, rInner, rOuter, nPoints, angleOffset, K AS _UNSIGNED LONG)
  571.     ' x, y are same as for circle,
  572.     ' rInner is center circle radius
  573.     ' rOuter is the outer most point of star
  574.     ' nPoints is the number of points,
  575.     ' angleOffset = angle offset IN DEGREES, it will be converted to radians in sub
  576.     ' this is to allow us to spin the polygon of n sides
  577.  
  578.     pAngle = _PI(2) / nPoints: radAngleOffset = angleOffset
  579.     x1 = x + rInner * COS(radAngleOffset)
  580.     y1 = y + rInner * SIN(radAngleOffset)
  581.     FOR i = 0 TO nPoints - 1
  582.         x2 = x + rOuter * COS(i * pAngle + radAngleOffset + .5 * pAngle)
  583.         y2 = y + rOuter * SIN(i * pAngle + radAngleOffset + .5 * pAngle)
  584.         x3 = x + rInner * COS((i + 1) * pAngle + radAngleOffset)
  585.         y3 = y + rInner * SIN((i + 1) * pAngle + radAngleOffset)
  586.         ftri x1, y1, x2, y2, x3, y3, K
  587.         'triangles leaked
  588.         'LINE (x1, y1)-(x2, y2), K
  589.         'LINE (x2, y2)-(x3, y3), K
  590.         'LINE (x3, y3)-(x1, y1), K
  591.         x1 = x3: y1 = y3
  592.     NEXT
  593.     fcirc x, y, rInner, K
  594.  
  595. FUNCTION TS$ (n AS INTEGER) ' special for this app
  596.     TS$ = RIGHT$(STR$(n), 2)
  597.  
  598. ' so every eight chars is a node, if 2 nodes in a row repeat then stuck in loop
  599. FUNCTION duplicate (s$) ' path nodes have 2 char x, a comma, 2 char y a comma and a Letter = length of 7 and another comma
  600.     duplicate = -1
  601.     FOR i = 1 TO LEN(s$) STEP 8
  602.         test$ = MID$(s$, i, 16)
  603.         FOR j = i + 8 TO LEN(s$) STEP 8
  604.             IF test$ = MID$(s$, j, 16) THEN EXIT FUNCTION
  605.         NEXT
  606.     NEXT
  607.     duplicate = 0
  608.  
  609. SUB arrow (x0, y0, rAngle, lngth)
  610.     DIM x1, y1, x2, y2, i AS INTEGER
  611.     x2 = x0 - lngth * COS(rAngle)
  612.     y2 = y0 - lngth * SIN(rAngle)
  613.     drawLink x0, y0, .001 * lngth, x2, y2, .01 * lngth, &HFF00BB00
  614.     LINE (x0, y0)-(x2, y2), &HFF00BB00
  615.     x2 = x0 - .1 * lngth * COS(rAngle - .2 * _PI)
  616.     y2 = y0 - .1 * lngth * SIN(rAngle - .2 * _PI)
  617.     x1 = x0 - .1 * lngth * COS(rAngle + .2 * _PI)
  618.     y1 = y0 - .1 * lngth * SIN(rAngle + .2 * _PI)
  619.     ftri x0, y0, x1, y1, x2, y2, &HFFFF8800
  620.     FOR i = .8 * lngth TO lngth STEP 3
  621.         x1 = x0 - i * COS(rAngle)
  622.         y1 = y0 - i * SIN(rAngle)
  623.         x2 = x1 - .1 * lngth * COS(rAngle - .25 * _PI)
  624.         y2 = y1 - .1 * lngth * SIN(rAngle - .25 * _PI)
  625.         LINE (x1, y1)-(x2, y2), &HFF0000FF
  626.         x2 = x1 - .1 * lngth * COS(rAngle + .25 * _PI)
  627.         y2 = y1 - .1 * lngth * SIN(rAngle + .25 * _PI)
  628.         LINE (x1, y1)-(x2, y2), &HFF0000FF
  629.     NEXT
  630.  
  631. SUB drawLink (x1, y1, r1, x2, y2, r2, c AS _UNSIGNED LONG)
  632.     DIM a, a1, a2, x3, x4, x5, x6, y3, y4, y5, y6
  633.     a = _ATAN2(y2 - y1, x2 - x1)
  634.     a1 = a + _PI(1 / 2)
  635.     a2 = a - _PI(1 / 2)
  636.     x3 = x1 + r1 * COS(a1): y3 = y1 + r1 * SIN(a1)
  637.     x4 = x1 + r1 * COS(a2): y4 = y1 + r1 * SIN(a2)
  638.     x5 = x2 + r2 * COS(a1): y5 = y2 + r2 * SIN(a1)
  639.     x6 = x2 + r2 * COS(a2): y6 = y2 + r2 * SIN(a2)
  640.     fquad x3, y3, x4, y4, x5, y5, x6, y6, c
  641.  
  642. 'need 4 non linear points (not all on 1 line) list them clockwise so x2, y2 is opposite of x4, y4
  643. SUB fquad (x1 AS INTEGER, y1 AS INTEGER, x2 AS INTEGER, y2 AS INTEGER, x3 AS INTEGER, y3 AS INTEGER, x4 AS INTEGER, y4 AS INTEGER, c AS _UNSIGNED LONG)
  644.     ftri x1, y1, x2, y2, x4, y4, c
  645.     ftri x3, y3, x4, y4, x1, y1, c
  646.  
  647. SUB Split (SplitMeString AS STRING, delim AS STRING, loadMeArray() AS STRING)
  648.     DIM curpos AS LONG, arrpos AS LONG, LD AS LONG, dpos AS LONG 'fix use the Lbound the array already has
  649.     curpos = 1: arrpos = LBOUND(loadMeArray): LD = LEN(delim)
  650.     dpos = INSTR(curpos, SplitMeString, delim)
  651.     DO UNTIL dpos = 0
  652.         loadMeArray(arrpos) = MID$(SplitMeString, curpos, dpos - curpos)
  653.         arrpos = arrpos + 1
  654.         IF arrpos > UBOUND(loadMeArray) THEN REDIM _PRESERVE loadMeArray(LBOUND(loadMeArray) TO UBOUND(loadMeArray) + 1000) AS STRING
  655.         curpos = dpos + LD
  656.         dpos = INSTR(curpos, SplitMeString, delim)
  657.     LOOP
  658.     loadMeArray(arrpos) = MID$(SplitMeString, curpos)
  659.     REDIM _PRESERVE loadMeArray(LBOUND(loadMeArray) TO arrpos) AS STRING 'get the ubound correct
  660.  
  661.  

 
Tilt Maze with AI.PNG
« Last Edit: August 24, 2020, 01:57:07 am by bplus »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #17 on: August 24, 2020, 09:11:54 am »
That is amazing work, @bplus!  Man I wish I had math skill like that in my brain.   I'll have to put on a pot of coffee and sit and study your code. Thanks for commenting it. 

I was reading about the A* pathfinding method recently, trying to understand that. Have you made one of those in QB64? 

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #18 on: August 24, 2020, 11:10:22 am »
That is amazing work, @bplus!  Man I wish I had math skill like that in my brain.   I'll have to put on a pot of coffee and sit and study your code. Thanks for commenting it. 

I was reading about the A* pathfinding method recently, trying to understand that. Have you made one of those in QB64? 

- Dav

:) Yes I've been studying PathFinders for some time. Someone mentioned A* a long time ago that got me going on my own path.
https://www.qb64.org/forum/index.php?topic=410.0

There might be more up to date one with regular maze
https://www.qb64.org/forum/index.php?topic=1997.msg112246#msg112246

There are 9 pr 10 references with Advanced Search using bplus, regular search sucks!

I used what I learned for the 3rd type of Paint Fill that I adapted and showed Ken most recently.

Steve McNeill gave me an invaluable clue for more efficient algo early on. (Kinda like he helped with clue on String Math.) Plus he worked his own versions along with me, that encouragement very helpful. Thanks again @SMcNeill :)

I don't know if this is math so much as playing around allot with recursive procedures, more computer science in my way of categorizing things.

Can you tell I am kind of proud of yesterday's accomplishments?
« Last Edit: August 24, 2020, 11:14:22 am by bplus »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #19 on: August 25, 2020, 07:19:13 pm »
Cool, thanks for the links, @bplus !  I have some studying to do, but it will have to wait a week - I have a couple composition/recording deadlines to meet and have to put programming on the back burner a little bit. 

Here's a little twist to the maze game - instead of reaching a star the goal is to color the whole maze.   Not always easy, especially if you start off in the wrong direction.  The graphics are simple, and could be drawn in QB64 easily, but I left it in as using images so I can update the images later to better stuff.

Thanks for your interest/help in my little puzzle games, bplus!

- Dav

Code: QB64: [Select]
  1. '=============
  2. 'MAZEPAINT.BAS v1.0
  3. '=============
  4. 'paint the maze puzzle game.
  5. 'Coded by Dav for QB64-GL 1.4, AUG/2020
  6.  
  7. 'Use arrows - move the ball to Paint the maze.
  8. 'Paint all of the maze to advance to next level.
  9.  
  10.  
  11. DEFINT A-Z
  12.  
  13. puzzle = 1 'start on level 1
  14. puzzlemax = 9 'there are 10 levels total
  15.  
  16.  
  17. 'load images...
  18. ball& = BASIMAGE1&
  19. wall& = BASIMAGE2&
  20. pass& = BASIMAGE3&
  21. face& = BASIMAGE6&
  22.  
  23. '======
  24. restart:
  25. '======
  26.  
  27. _TITLE "Level: " + STR$(puzzle) + " of" + STR$(puzzlemax)
  28.  
  29. GOSUB SetLevel
  30.  
  31. 'draw level
  32. CLS , _RGB(229, 237, 243)
  33. REDIM SHARED pdata$(grid, grid)
  34. bs = INT(_WIDTH / grid)
  35. m = 1
  36. FOR x = 0 TO grid - 1
  37.     FOR y = 0 TO grid - 1
  38.         a$ = MID$(puz$, m, 1)
  39.         pdata$(x + 1, y + 1) = a$
  40.         IF a$ = "x" THEN
  41.             _PUTIMAGE (y * bs + 1, x * bs + 1)-(y * bs + bs - 1, x * bs + bs - 1), wall&
  42.         END IF
  43.         IF a$ = "b" THEN
  44.             _PUTIMAGE (y * bs + 1, x * bs + 1)-(y * bs + bs - 1, x * bs + bs - 1), ball&
  45.             ballx = y * bs: bally = x * bs
  46.         END IF
  47.         m = m + 1
  48.     NEXT
  49.  
  50.  
  51.     'get user keypress...
  52.     DO: k$ = INKEY$: _AUTODISPLAY: LOOP UNTIL k$ <> ""
  53.     'Note: The _AUTODISPLAY up there is to make sure
  54.     'screen doesnt go blank if user minimizes program
  55.  
  56.     'if user presses right arrow....
  57.     IF k$ = CHR$(0) + CHR$(77) THEN
  58.  
  59.         'current ball location in x,y
  60.         cx = ballx / bs + 1: cy = bally / bs + 1
  61.         pdata$(cy, cx) = "." 'paint current square
  62.  
  63.         'check 1st to see if square is blocked...
  64.         IF pdata$(cy, cx + 1) = "x" THEN GOTO moved
  65.  
  66.         'Move ball right...
  67.         FOR x = cx + 1 TO grid + 1
  68.             'move it smoothly, by pixels...
  69.             FOR x2 = ((x - 1 - cx) * bs) TO ((x - cx) * bs) STEP 2
  70.                 pdata$(cy, x - 1) = "." 'mark square as painted
  71.                 'if come to wall...
  72.                 IF pdata$(cy, x) = "x" THEN
  73.                     ballx = ballx + x2
  74.                     SOUND 500, .1: GOTO moved
  75.                 END IF
  76.                 'Draw ball image....
  77.                 _PUTIMAGE (ballx + x2, bally)-(ballx + x2 + bs, bally + bs), ball&
  78.                 _DISPLAY
  79.                 _LIMIT 500
  80.             NEXT
  81.         NEXT
  82.     END IF
  83.  
  84.     'if left arrow...
  85.     IF k$ = CHR$(0) + CHR$(75) THEN
  86.  
  87.         cx = ballx / bs + 1: cy = bally / bs + 1
  88.  
  89.         pdata$(cy, cx) = "." 'mark current as painted
  90.  
  91.         'check 1st to see if if left square is wall
  92.         IF pdata$(cy, cx - 1) = "x" THEN GOTO moved
  93.  
  94.         'Move ball left...
  95.         FOR x = cx - 1 TO 0 STEP -1
  96.             FOR x2 = (x + 1 - cx) * bs TO (x - cx) * bs STEP -2
  97.                 pdata$(cy, x + 1) = "." 'mark square as painted
  98.                 IF pdata$(cy, x) = "x" THEN
  99.                     ballx = ballx + x2
  100.                     SOUND 500, .1
  101.                     GOTO moved
  102.                 END IF
  103.                 _PUTIMAGE (ballx + x2, bally)-(ballx + x2 + bs, bally + bs), ball&
  104.                 _DISPLAY
  105.                 _LIMIT 500
  106.             NEXT
  107.         NEXT
  108.     END IF
  109.  
  110.     'down arrow
  111.     IF k$ = CHR$(0) + CHR$(80) THEN
  112.         cx = ballx / bs + 1: cy = bally / bs + 1 'current x,y
  113.         pdata$(cy, cx) = "." 'mark current as painted
  114.         'check if blocked...
  115.         IF pdata$(cy + 1, cx) = "x" THEN GOTO moved
  116.         FOR y = cy + 1 TO grid + 1
  117.             FOR y2 = (y - 1 - cy) * bs TO (y - cy) * bs STEP 2
  118.                 pdata$(y - 1, cx) = "." 'mark square as painted
  119.                 IF pdata$(y, cx) = "x" THEN
  120.                     bally = bally + y2
  121.                     SOUND 500, .1
  122.                     GOTO moved
  123.                 END IF
  124.                 _PUTIMAGE (ballx, bally + y2)-(ballx + bs, bally + y2 + bs), ball&
  125.                 _DISPLAY
  126.                 _LIMIT 500
  127.             NEXT
  128.         NEXT
  129.     END IF
  130.  
  131.     'if up arrow
  132.     IF k$ = CHR$(0) + CHR$(72) THEN
  133.         cx = ballx / bs + 1: cy = bally / bs + 1 'current x,y
  134.         pdata$(cy, cx) = "." 'mark current as painted
  135.         'check if blocked...
  136.         IF pdata$(cy - 1, cx) = "x" THEN GOTO moved
  137.         FOR y = cy - 1 TO 0 STEP -1
  138.             pdata$(y + 1, cx) = "." 'mark square as painted
  139.             FOR y2 = (y + 1 - cy) * bs TO (y - cy) * bs STEP -2
  140.                 IF pdata$(y, cx) = "x" THEN
  141.                     bally = bally + y2
  142.                     SOUND 500, .1
  143.                     GOTO moved
  144.                 END IF
  145.                 _PUTIMAGE (ballx, bally + y2)-(ballx + bs, bally + y2 + bs), ball&
  146.                 _DISPLAY
  147.                 _LIMIT 500
  148.             NEXT
  149.         NEXT
  150.     END IF
  151.  
  152.     IF k$ = CHR$(32) THEN GOTO restart
  153.  
  154.     IF k$ = "+" THEN
  155.         puzzle = puzzle + 1: IF puzzle > puzzlemax THEN puzzle = 1
  156.         GOTO restart
  157.     END IF
  158.  
  159.     IF k$ = "-" THEN
  160.         puzzle = puzzle - 1: IF puzzle < 1 THEN puzzle = puzzlemax
  161.         GOTO restart
  162.     END IF
  163.  
  164.  
  165.     moved:
  166.  
  167.     IF k$ <> "" THEN _KEYCLEAR
  168.  
  169.     GOSUB CheckForDone
  170.  
  171.  
  172.  
  173. '===========
  174. CheckForDone:
  175. '===========
  176.  
  177. 'see if all of maze cleared...
  178. cleared = 1
  179. FOR x = 1 TO grid
  180.     FOR y = 1 TO grid
  181.         IF pdata$(x, y) = " " THEN cleared = 0
  182.     NEXT
  183.  
  184. IF cleared = 1 THEN
  185.     SOUND 5000, .7
  186.     _PUTIMAGE (160, 210), pass&: _DISPLAY
  187.     _DELAY 2
  188.     puzzle = puzzle + 1
  189.     'If that was last level...
  190.     IF puzzle > puzzlemax THEN
  191.         'show smiley face
  192.         _PUTIMAGE (100, 100)-(500, 500), face&: _DISPLAY
  193.         'play happy music
  194.         PLAY "o4l8gfedcal4gl8fgabo5co4gl4el8defedefgagabl4o5co4c"
  195.         PLAY "o3l8co2l16gf#gl8g#gpbo3c"
  196.         _DELAY 6
  197.         puzzle = 1
  198.     END IF
  199.     GOTO restart
  200.  
  201.  
  202.  
  203. '=======
  204. SetLevel:
  205. '=======
  206.  
  207. 'x is the wall, b is ball
  208. IF puzzle = 1 THEN
  209.     puz$ = "": grid = 12
  210.     puz$ = puz$ + "xxxxxxxxxxxx"
  211.     puz$ = puz$ + "xxxxxxxxxxxx"
  212.     puz$ = puz$ + "x       x  x"
  213.     puz$ = puz$ + "x x        x"
  214.     puz$ = puz$ + "x          x"
  215.     puz$ = puz$ + "x          x"
  216.     puz$ = puz$ + "x  x       x"
  217.     puz$ = puz$ + "xb       x x"
  218.     puz$ = puz$ + "xx         x"
  219.     puz$ = puz$ + "xxxxxxxxxxxx"
  220.     puz$ = puz$ + "xxxxxxxxxxxx"
  221.     puz$ = puz$ + "xxxxxxxxxxxx"
  222.  
  223.  
  224. 'x is the wall, b is ball
  225. IF puzzle = 2 THEN
  226.     puz$ = "": grid = 13
  227.     puz$ = puz$ + "xxxxxxxxxxxxx"
  228.     puz$ = puz$ + "xxxxxxxxxxxxx"
  229.     puz$ = puz$ + "xb x  xx    x"
  230.     puz$ = puz$ + "x     x   x x"
  231.     puz$ = puz$ + "x     x   x x"
  232.     puz$ = puz$ + "x           x"
  233.     puz$ = puz$ + "x   x       x"
  234.     puz$ = puz$ + "xxx x   x   x"
  235.     puz$ = puz$ + "x   xx  xx  x"
  236.     puz$ = puz$ + "x           x"
  237.     puz$ = puz$ + "x   xx     xx"
  238.     puz$ = puz$ + "xxxxxxxxxxxxx"
  239.     puz$ = puz$ + "xxxxxxxxxxxxx"
  240.     puz$ = puz$ + "xxxxxxxxxxxxx"
  241.  
  242. IF puzzle = 3 THEN
  243.     puz$ = "": grid = 13
  244.     puz$ = puz$ + "xxxxxxxxxxxxx"
  245.     puz$ = puz$ + "xx         xx"
  246.     puz$ = puz$ + "x         x x"
  247.     puz$ = puz$ + "x x         x"
  248.     puz$ = puz$ + "xx       x  x"
  249.     puz$ = puz$ + "x  x       xx"
  250.     puz$ = puz$ + "x       x   x"
  251.     puz$ = puz$ + "x   x       x"
  252.     puz$ = puz$ + "x      xx   x"
  253.     puz$ = puz$ + "x    x      x"
  254.     puz$ = puz$ + "xbx       xxx"
  255.     puz$ = puz$ + "xxxxxxxxxxxxx"
  256.     puz$ = puz$ + "xxxxxxxxxxxxx"
  257.  
  258. IF puzzle = 4 THEN
  259.     puz$ = "": grid = 13
  260.     puz$ = puz$ + "xxxxxxxxxxxxx"
  261.     puz$ = puz$ + "xbx       x x"
  262.     puz$ = puz$ + "x x  x    x x"
  263.     puz$ = puz$ + "x xxxx xxxx x"
  264.     puz$ = puz$ + "x      x    x"
  265.     puz$ = puz$ + "xx       xx x"
  266.     puz$ = puz$ + "x     xx xx x"
  267.     puz$ = puz$ + "x      x    x"
  268.     puz$ = puz$ + "x xxxx xxxx x"
  269.     puz$ = puz$ + "x x  x    x x"
  270.     puz$ = puz$ + "x x       x x"
  271.     puz$ = puz$ + "xxxxxxxxxxxxx"
  272.     puz$ = puz$ + "xxxxxxxxxxxxx"
  273.  
  274. IF puzzle = 5 THEN
  275.     puz$ = "": grid = 16
  276.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  277.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  278.     puz$ = puz$ + "x   x    x     x"
  279.     puz$ = puz$ + "x   x         xx"
  280.     puz$ = puz$ + "x    x   x  x  x"
  281.     puz$ = puz$ + "x    x      x  x"
  282.     puz$ = puz$ + "xx        xx   x"
  283.     puz$ = puz$ + "x    xx   x    x"
  284.     puz$ = puz$ + "x            xxx"
  285.     puz$ = puz$ + "x       xx x   x"
  286.     puz$ = puz$ + "x x   x xx     x"
  287.     puz$ = puz$ + "x xx  x   x  xxx"
  288.     puz$ = puz$ + "xbx       x xxxx"
  289.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  290.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  291.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  292.  
  293. IF puzzle = 6 THEN
  294.     puz$ = "": grid = 16
  295.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  296.     puz$ = puz$ + "xxbxxxxxxxx  xxx"
  297.     puz$ = puz$ + "xx xx        xxx"
  298.     puz$ = puz$ + "xx xx xxxxx  xxx"
  299.     puz$ = puz$ + "xx xx xx   xxxxx"
  300.     puz$ = puz$ + "xx    xx x xxxxx"
  301.     puz$ = puz$ + "xx     x x xxxxx"
  302.     puz$ = puz$ + "xxx    x    xxxx"
  303.     puz$ = puz$ + "xxx         xxxx"
  304.     puz$ = puz$ + "xxx         xxxx"
  305.     puz$ = puz$ + "xxx     x   xxxx"
  306.     puz$ = puz$ + "xxx     x   xxxx"
  307.     puz$ = puz$ + "xxx  x  xxxxxxxx"
  308.     puz$ = puz$ + "xxx  x  xxxxxxxx"
  309.     puz$ = puz$ + "xxx  x  xxxxxxxx"
  310.     puz$ = puz$ + "xxxxxxxxxxxxxxxx"
  311.  
  312. IF puzzle = 7 THEN
  313.     puz$ = "": grid = 20
  314.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  315.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  316.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  317.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  318.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  319.     puz$ = puz$ + "xxx     b     x    x"
  320.     puz$ = puz$ + "x          x     x x"
  321.     puz$ = puz$ + "x x    x     xxx x x"
  322.     puz$ = puz$ + "x xxx            x x"
  323.     puz$ = puz$ + "x x    x x  x      x"
  324.     puz$ = puz$ + "x x  x      xx     x"
  325.     puz$ = puz$ + "x          xx   x  x"
  326.     puz$ = puz$ + "x     x            x"
  327.     puz$ = puz$ + "x     x            x"
  328.     puz$ = puz$ + "x  x    x   x   x  x"
  329.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  330.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  331.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  332.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  333.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  334.  
  335. IF puzzle = 8 THEN
  336.     puz$ = "": grid = 20
  337.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  338.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  339.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  340.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  341.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  342.     puz$ = puz$ + "x x     b  xx      x"
  343.     puz$ = puz$ + "x          x       x"
  344.     puz$ = puz$ + "x x xxx  xxx xxxx  x"
  345.     puz$ = puz$ + "x     x        xx xx"
  346.     puz$ = puz$ + "x   xxx  xx        x"
  347.     puz$ = puz$ + "x   x        x     x"
  348.     puz$ = puz$ + "x   xx   x  xx  xx x"
  349.     puz$ = puz$ + "x               x  x"
  350.     puz$ = puz$ + "x      x    xxx    x"
  351.     puz$ = puz$ + "xx     x   xx     xx"
  352.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  353.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  354.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  355.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  356.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  357.  
  358. IF puzzle = 9 THEN
  359.     puz$ = "": grid = 20
  360.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  361.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  362.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  363.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  364.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  365.     puz$ = puz$ + "x                xxx"
  366.     puz$ = puz$ + "x xxxxxx xxxxxxx xxx"
  367.     puz$ = puz$ + "x xxxxx   xxxxxx   x"
  368.     puz$ = puz$ + "x xxxxx   xxxxxx x x"
  369.     puz$ = puz$ + "x xxxxx b        x x"
  370.     puz$ = puz$ + "x xxxxxxxxxxxxxxxx x"
  371.     puz$ = puz$ + "x xxxxxxxxxxxxxxxx x"
  372.     puz$ = puz$ + "x xxxxx          x x"
  373.     puz$ = puz$ + "x         xxxxx    x"
  374.     puz$ = puz$ + "xxxxxx     xxxx xx x"
  375.     puz$ = puz$ + "xxxxxxxx        xx x"
  376.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  377.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  378.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  379.     puz$ = puz$ + "xxxxxxxxxxxxxxxxxxxx"
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386. FUNCTION BASIMAGE1& 'BALL.BMP
  387.     v& = _NEWIMAGE(191, 193, 32)
  388.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  389.     A$ = ""
  390.     A$ = A$ + "haIkMVoN=M]67_o_DE[FUZgRJ>V9VM=FDS=J5a#44?RiDSG^RWHhJXXXD:]D"
  391.     A$ = A$ + "JMEZYJ^EkoA[[?;?K=RLSCBfkmkJOfOoQ??iTTSS\F[_kmnMm^N7^dV6]kB2"
  392.     A$ = A$ + "Q#842Q#842Q#842Q#842Q#84i#n[;G_k_namhNj5g]kYo`^Loa5fQk9OgfL?"
  393.     A$ = A$ + "iLKacS?kVOY_b_kg?ofm_?NooiUZcoIHmh#8J>#SS6n^7MU^KDolMogM=Cg5"
  394.     A$ = A$ + "ghXLWK]S`M\E<4gQGfPLkYlBLkjck[KkOF_MKMN?W=?WNjfbLkUoW]cig7GM"
  395.     A$ = A$ + ";XO^3\h1hOoWNe3go_o:KKb^[^[?eM[3^4gm?iJmGOHmhET_Pk1oXc\9_nkV"
  396.     A$ = A$ + "7X2gKl6^GRmFAomji=<cNhZIJMc]l9m?LE>Q?dEnHj\K1S^C^iEJ7McMh_WK"
  397.     A$ = A$ + "F3mMO1cL8M`3_Nf3kml_W?ODMbonGlhkRoOoZVJGM[IjMgOM2Gk`e6=logK\"
  398.     A$ = A$ + "g_`O=7oMac;\NNBDl0fNLoCDSkjeGVk\[YDgAZJ`^eoYO\[jYlA^I<X>hVHO"
  399.     A$ = A$ + "O[GijPdP9e_fkFdhn0oeHl<5NnbEgidMgi`Ej]Obji=Af3d>=DSamL[H\MfO"
  400.     A$ = A$ + "oiYDBkMS_g]c4]NcahjeKjV#OJWKj3lMLU=R>jFjo\;^omGd?_]CH_d_^o5h"
  401.     A$ = A$ + "nS_OWV?g:2CNlgF[gfQ8md:Vl7i]m`JMM[5^FU[IaF<nNdogkh[bliIAH`M>"
  402.     A$ = A$ + "BE^;EkHmj3\;7KH\FcVD`c[hj1f?Bd?CkK>O2kKUeOfk8f^7RfbT4`nY[Mfm"
  403.     A$ = A$ + "doJlM4?_cje2Ab2nY9Jm7kQiNPF[3]6fW0nHRWk5Mo0MV25GPM^H_;[gh[`?"
  404.     A$ = A$ + "I0_Sij^#2fK3n?UGS?C]NmBdf1o`ORZ7ZKnSlmmgScJ=FF0lGd>:[?^[\e9j"
  405.     A$ = A$ + "?_>[G355>\o=f3kiGg8lWE:nj`JmDF3>W]Eo9Mm5OomnjEKnjZXi1KEoa_LL"
  406.     A$ = A$ + "^jGH9NOaK]6ZH0^6h#E>#g3oVeKnj[hEQcco<eDZonl5cnYd:h\[aGHLna\O"
  407.     A$ = A$ + "0>[K[Gc5?o<YR^oTdm9;hODnj]?dB=OM??3WA?g[Wh6cJ=AN3Rg>f?lMoZU["
  408.     A$ = A$ + "W1TbP=>oBMce7CIjNmY?hc<doAO?a`]eJRRM`WKXiaOd4?`F[14>OlcAl]Nc"
  409.     A$ = A$ + "mG^ijSRA`o=47a7Mi3f]YIeSLCl7TEPHYVLGPc?Da8Al2aM2i`TEa:_X`PL#"
  410.     A$ = A$ + "SH3dJmBa04O9<GBlg8MOfPXh3Bf0efPWQR?k]NmDdbPh1We?bCO[e#I=`_1T"
  411.     A$ = A$ + "[f=lLe5I;86Z8^1El#dbPlWRLdNZmo]=O=DdjQh:iWfnDlnY`J=EX3ncQHYU"
  412.     A$ = A$ + "l_fje=Al0n05o0amoU=#==\_FRiH\EDg__h2R;JRa#UK0==\WFZ7=F_>9B6`"
  413.     A$ = A$ + "?MLO=\oAa1ac1OgOi=?N__a\NmATl\_5=0oj]ej^#0R=LZ1IF_V8B?8NXcce"
  414.     A$ = A$ + "#^OkHEk>Ie3Ci<N>Ue=S^k[KYF[3]P[EgLlel<[G34f0eDAR1mlFMQPc]ZZ9"
  415.     A$ = A$ + "ZmeVg1oOBnGTGZAF<>9_78OX]N^GH?X3h\<]FGVdHml\8<QkmS??\FOVdJOR"
  416.     A$ = A$ + "oN[W[5Q5T7`\ggRAKoYWjdDm[1QXY`JmJL2mO7>C3[WC5Q=TW6LnnF[GSC8o"
  417.     A$ = A$ + "JI?mF?g:2O8fOXF4H]V]]2a^TecUR\7\W#ZYTF[OKCDkHmm##[W;5I;8f^XW"
  418.     A$ = A$ + "9I^n]E2e_ARK?[W75ICR\A>[eW`8758GKEMSBdJ9ZVaWe\moWgaDeml5a6F["
  419.     A$ = A$ + "WK9#<:YJ0^8>PhO9[dO8_bfV\bgFA\1m7:O=_:0df=7Ln]LMZlU_8>QHNPlm"
  420.     A$ = A$ + "`JmMc1eR;I[S8Yh1WJMV[aK:\NNADL3a6`aFa#<GWooCkCm`gji8Aa9H7=aj"
  421.     A$ = A$ + "Yejl63iSRjWQRT6Re7R7h#Z6W`i?XcaBTFl`C_AcelAfj84Y5TWgLnAF[kSd"
  422.     A$ = A$ + "n:Ne4Y5AegO[em0Wk0fQImLR8o0egL;]kag3\NVMnT[=F?G8bGP?O8n1\:F7"
  423.     A$ = A$ + "hLf8VedIh:\0b]a[\e9JcmnENY8<4ZUUFUO;7YZ1;kM4V2mT:;dndCP\N\;b"
  424.     A$ = A$ + "g#o5o>7^bDEgCo3FiVR`JXol#olRNCHJXk9n5H?^Z_0921lifB:e;7a_B7NI"
  425.     A$ = A$ + "3j5iCY#H9AfOT6JOZi>Z^i;2=B3]?oo#NTImHE8RPjMIJD;C\NL:4=V]>_NW"
  426.     A$ = A$ + "heb4ZgDLN2F?F5R62e61RaQTDkOk3]DEol517;HdMbg7[BJKNdIi:2=Xn8Dk"
  427.     A$ = A$ + "\kIRZkYWPbeHF?F5R62nKWLI?YdmLfI4kJb7?R#4bIfT:VnOlIg\_OH[cdB4"
  428.     A$ = A$ + "ZL[3^T4AkOoCDSkc7U\gA4fT4niWJ3QZiJR#Wh>^>aFO[7C2AQBLK_SeS7Qh"
  429.     A$ = A$ + "eAM;XOn_6WJoknE;glaU#ljPhIV_6WJO[7C2AQ#=C[K^jGH9Bk;bM`iK5gmV"
  430.     A$ = A$ + "JnLS\UB82E8V3RklGW?GE?B4Q>TkjE>Q?<fen:n=5Q>4G3L_ohDkcn7DN::2"
  431.     A$ = A$ + "Mh\GiNoaYfO?UGRg>:[7K2AcaTjGkMcNHa[f7oVZn6Z8dIlm^Mnj3KLZmIO^"
  432.     A$ = A$ + "Dco]N\94=74Sa4SmaYfOccYW:O]4I2VHOO;Ym5iBTfGTG9^endGQTmnR\0h["
  433.     A$ = A$ + "7]GGAN4laOLZmYNDYj]_8d99la9aaVdnR#7\eWN#JLZmicMmOj7KnHC8J>`g"
  434.     A$ = A$ + "ndoASK]?em:[7K2Ac1fk4gab6O^:6V5Q>U=R>6keW=nLEmGF4jTDi^R#4jPO"
  435.     A$ = A$ + "hYFl;]_8_ajVAgM7Ha38FenD[[\NL94_>RfCJLZmOdIfTiS;QX#9>enDO?]N"
  436.     A$ = A$ + "l845:aYfgKgcAZbkoD[7G2Aca3>ejRM]_Z1iR\0oa5fA\[momc_MO]JH2mYM"
  437.     A$ = A$ + "V?n4R63aa6fV4gjNPj#>W_e<7B7<OL:4=6Z=9dKPB2]?LRZ7ZjeLRP4>G[TB"
  438.     A$ = A$ + "g3GKgcBeY7A`1eTWm]Xhm<]J<dgQD]9D4JP?HXogVTJOf_;WI\eSEQXQP]8o"
  439.     A$ = A$ + "BMc=AenPeSCQXa#]Dh^7MUYRfGkgE4JTdjn8]_Z9cR#Sd#kOoC^Fon:dIL92"
  440.     A$ = A$ + "1XGCLcmGNZXmOj5g]kjkIN:fN411hKc7n=[?Edn`SofJmi3_eSKAn6Z3EGN;"
  441.     A$ = A$ + "C`7c1YUf78?1dmn5F2nLQh[?=em`oI93dEnHj\iSOAn5j7:Y]^7^FMcaMlE>"
  442.     A$ = A$ + "D]WGQ9#M1Wh;c2]o]>hBLGZfaj[5FF??8bO#\eHQ^?2Ra1EOV5Y=d;AaGS9I"
  443.     A$ = A$ + "<;G8#]:TJ0Zec7Rl3E<f>k^gG_JCemNNVM?dGF\Nn#T?0oJB>DI^^oILk3]D"
  444.     A$ = A$ + "cW?4i7f`<kQkbKNlV[kQojbekeobO?RdROkHEK^^_Q#LT>_BkXic;RRG8WLO"
  445.     A$ = A$ + "bg]=cej=VS^l1k[ocF?o8:>Qj`#BWC^]FDM;DTT#O_jZkLjV[cK:8NRh_Aja"
  446.     A$ = A$ + "SF??9:>QmEJ]>_idok]RnkcKN[WW45?#^XoTc]5ceg_FZM\b^OA\1a<CLg?9"
  447.     A$ = A$ + "BB\NnBDl0jnkMlEI^V^UXmEMlAdFQl3iRKLDV[WK9#<^mco[YYLKAdVPlS:8"
  448.     A$ = A$ + "RKWF1kX\nXmm:JE\Xam1^7Nj=J^6^ebIZYDe?f5]H8Ne8>1\FofFPLYl^Oeb"
  449.     A$ = A$ + "mS5[W?5I;2IOiGXP]oTCaS[G_YicWR`7R9bK\g_88SKWF3F?O:b6DcdjVo[F"
  450.     A$ = A$ + "[GSCXF^aHBakPX#`JmJB`QGfPD]lDl:`m49?4]FOVT#oIWHN#iiRXQ\Wb;9H"
  451.     A$ = A$ + "b5[T4R9YE=e^jVJoOKcWc5f3n0YH`W>5:TcIDGgdmocg`m0YNJJ]N<]i:KMR"
  452.     A$ = A$ + "^5?n^Hnl_`FX^6K]Fd2XG][JKEnSXcjlYo`^<G3J9HkSdoi7`W>dKhBcJVOX"
  453.     A$ = A$ + "2Wk;noAm[ml3gjP;bLMG8aYGm`miS\e[;RT1ZKbT7:iMkLJ:`gWDKWEMM^h6"
  454.     A$ = A$ + "[eIQ<ojnGPi[?Rh3^G_dl56d;k#oC=hbje=AlP_G=40J[\2AehF]7h\9Aa]U"
  455.     A$ = A$ + "ejX\:<gANOAmXcjeBAQ3g_RN`LF>W331`6XS]RQhZN:ZVo4jPO:hNEgmX[dL"
  456.     A$ = A$ + "MCa2gXnik>kJ:e_70UoGQ9dkMX^:lmK8KECAb:LU]=IGm;\4cGW5_<d[??DU"
  457.     A$ = A$ + "3dLmAa<oiUZcWkk<OCNl[W1H;4;Rd_elmm]LJ<YUf#N<Omj;Ci0OPPejQl8L"
  458.     A$ = A$ + "=`?_SYj?o4i;XdQXh>??U_9Q:4?PWK]S`Ef8Do>:YQH`TJ]7_fjeMaO3a3:a"
  459.     A$ = A$ + "78mkdi?bggLMBa2llDZomlJOnF70[eRG5\1RcD1m_f7#l0e5Cl[0aU0nJ`je"
  460.     A$ = A$ + "Ha[7^75[M4k\F[ObJ#NE5e_`]NMDdbQJ1JdJ9jO5G#5VVWn4;n>PjNOF]nO;"
  461.     A$ = A$ + "nK`F8NV=e1V:WPb?b6c<6D7liA8e87UCE5W#^a7]Ncmf:O<M>gFW4iiPXggi"
  462.     A$ = A$ + "lkSkWfnDLgl0E8kic1#laMWSDe;j7fi]j44a55kOUNSCFZGF9RGX_Xf`W7#l"
  463.     A$ = A$ + "RB]QdJmILZcIl\_5=0ogS==5;egKAl0e:JbG<ZI:Am:Y\^m#lg?eeKR_B>oK"
  464.     A$ = A$ + "I;_X#QlW?B7am=Y6jaN42]c>HF3mMmoMQ6?jWmPC]>__^\N>DTMiAWIC^K^o"
  465.     A$ = A$ + "bmn0i0;N0nW9`im#<DHM<4QoI`V6b?`6ZkE^S8BJhj2Z[^=D?RODa7Bh35lW"
  466.     A$ = A$ + ":aJ:aH1nEQN^:fQ`N[ij6PG3DGZigS]FLM5a<6a5o6VI?N9M=#LT9O_;218F"
  467.     A$ = A$ + "R8Vj8g287c^FMcaG[MiI5GHmSd7[MDk]8N;>n:7ZgoB`AZji`[iWc_WNC9_O"
  468.     A$ = A$ + "nLoa_LLNOa`W7fZS?IDLb;42Q#842Q#842Q#842Q#842Q8?`o3#P%%L2"
  469.     btemp$ = ""
  470.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  471.         IF INSTR(1, B$, "%") THEN
  472.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  473.                 IF F$ <> "%" THEN C$ = C$ + F$
  474.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  475.             IF MID$(B$, j, 1) = "#" THEN
  476.         MID$(B$, j) = "@": END IF: NEXT
  477.         FOR t% = LEN(B$) TO 1 STEP -1
  478.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  479.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  480.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  481.     NEXT: btemp$ = btemp$ + X$: NEXT
  482.     btemp$ = _INFLATE$(btemp$)
  483.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  484.     BASIMAGE1& = _COPYIMAGE(v&): _FREEIMAGE v&
  485.  
  486.  
  487. FUNCTION BASIMAGE2& 'wall.bmp
  488.     v& = _NEWIMAGE(50, 50, 32)
  489.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  490.     A$ = ""
  491.     A$ = A$ + "haIkJ7C3023504e68QZ0L1VZ>R9<1NPT^bF=#a0T#78Yg7^QW0^m[NFJe?Re"
  492.     A$ = A$ + "lBXI7\LG7cYY#XW>>fg#c>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha>Ha"
  493.     A$ = A$ + ">Ha>Ha>Ha>Ha>Ha>Hi_eA4lD7ATM`bXonj=M1L<9%%h1"
  494.     btemp$ = ""
  495.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  496.         IF INSTR(1, B$, "%") THEN
  497.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  498.                 IF F$ <> "%" THEN C$ = C$ + F$
  499.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  500.             IF MID$(B$, j, 1) = "#" THEN
  501.         MID$(B$, j) = "@": END IF: NEXT
  502.         FOR t% = LEN(B$) TO 1 STEP -1
  503.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  504.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  505.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  506.     NEXT: btemp$ = btemp$ + X$: NEXT
  507.     btemp$ = _INFLATE$(btemp$)
  508.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  509.     BASIMAGE2& = _COPYIMAGE(v&): _FREEIMAGE v&
  510.  
  511.  
  512. FUNCTION BASIMAGE3& 'PASS.BMP
  513.     v& = _NEWIMAGE(324, 155, 32)
  514.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  515.     A$ = ""
  516.     A$ = A$ + "haIkM^7eFEEW7WG^8gD#05O55443#1a;1Z##PPY6VJjb[YYFj8Y>RCVFfXUF"
  517.     A$ = A$ + "jTY>#Y;<]1;]\\Y<_ARBZ8V>PGHQiUBdA6U9CId9=6eFSogIV?kmjg37Nhmi"
  518.     A$ = A$ + "iiLfkciimfg_[eWU;4>km_mi\gOOfg>kC?jA?BjQ#8427BBBBMgUl3UTTTlB"
  519.     A$ = A$ + "nQBBBBN9o#9999_TOXTTTTGb?DBBBb;i7:999iUl3UTTTlBnQBBBBNU7o`fk"
  520.     A$ = A$ + "m<^#84QRl352AgMJYUFBjE?KYdl37fPjObh7i#BVjhgYTY?aA842A7F6HojC"
  521.     A$ = A$ + "b0jK_;=o#l2?jY?fTcmXVLbGm4WR#84MHYeQ<0GOh:;o#jG8NQ;Lnc<i7MAO"
  522.     A$ = A$ + ":Q#8j`bXKM#9kl#7HYi7BO#agUlJYGiA942A7FfSMIkC6i>^Mb?D84MkAnQ2"
  523.     A$ = A$ + "Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hA"
  524.     A$ = A$ + "nQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q"
  525.     A$ = A$ + "#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAnQ2Q#hAn"
  526.     A$ = A$ + "Q2Q#hAnQ2Q#hYcPOh1__S<IPm[?EBc#XUFJY=CkAgjPR>];C8^kX7SFLF4aH"
  527.     A$ = A$ + "]N>UE:jkEa6?UE<VUh:VlY8ZgEDe9JV?Oj<h7^Oka>V<QA=dTadjPMaJNHW7"
  528.     A$ = A$ + "j0C6#Ok]SR>]cBN_K3OkR:^YnD\aH<aAFScmN<3;jH\N?WJ6eEZ>N6fPjOb^"
  529.     A$ = A$ + "^3K[[=Be`o6l;bC\=cmNGLagN]K3=IlSL81G_`R[653QL_X8ZgEDe9J6eGj<"
  530.     A$ = A$ + "j7B<bmd7nj?cTEmCnji6;F:Sd^NlXgdijZC4jeKa=e;96Gn2?eXRSbZ<B<Ng"
  531.     A$ = A$ + "GaW9ZHT[[N?WJFeEBG^`gQfMah9Uf;Lbkn>hl1=X<o\ggg?iEGeMUlGf`;Tl"
  532.     A$ = A$ + "AOhVJcfB_ok\QTo[omW9i?l`oh:aUAmR1kNAX?7\[?_?C]d8fj4I]mAgAo#R"
  533.     A$ = A$ + "aGna^S<Uge:Fhicml]>b2=][Wn_OmW?iOmbVG`G_5gcHBS`E_Wj0a47[KUgN"
  534.     A$ = A$ + "`aBmBKRaOegHNA5S?n?jRZDNiIdmm]?bfUj:eBhGQW4YKeNB3NPmeeok6eW#"
  535.     A$ = A$ + "j[4PGmOjiNTPSU?lmN[Tel[_VTQ^MmcA]RQldffd;^lOHUW3kcHgaPNVJ?;S"
  536.     A$ = A$ + "]>ASDmJG;o`67;43oR;mCk^oe<l3O[e]jT[oLWEb7lGNSP^nU_XCc5go`oQi"
  537.     A$ = A$ + "V<RQ]]9_h_M91U>oWon7f57?gm_hP^nj9:S4SghiO`^Hla_U;<Xda:[`Ml?N"
  538.     A$ = A$ + "h9geUO41i9FV??C[=]aekl5]a\E;?AK<WFO2;bhjmnc_Lb3NMWL=SQ#l3Ogg"
  539.     A$ = A$ + "HMEN><]mJW3b?cNFNcG`Lle9nom7;3E_feb?\aabELJ7TcKQOgZIdnieNjUV"
  540.     A$ = A$ + "<o?cNW\Qe^lP^NZ?ALOIWb1Tdj#6#bOlA^ePBW7kOI1^hhOkf^TP^nj9:S4S"
  541.     A$ = A$ + "Gha]o9khPkObS\hc>Xda:[`=LNcfi96b_ig\l3=mj[II9mKKJKo8jKX=GQ<V"
  542.     A$ = A$ + "AjOIA[ofOMS^OkX]RQ#l3AGiI<=gcQ[m_K6^i6h9naGL^^NkIiGoTWZ[N;eo"
  543.     A$ = A$ + ":3E_feb?\aabY>g9TLeWiW8if_T3[YdnQaN<Ua=lT7jjoR1MmgbGi#Lam9<["
  544.     A$ = A$ + "ailJ8m2AOW_hdCVjhgYTUM=WH#GOmT=nZ3mS?ZTQ\]m=i1^fC:Xdi\VgTZlL"
  545.     A$ = A$ + "2oO:kQlkm=Ko#dcmK^1WO4a>NBhSKcGXeg`gl?n4UFnch?Fb5>g]86Ra?lWl"
  546.     A$ = A$ + "e><Gj#LCoknM;i;W[[gNFN\cH?LSU?dOS\AZN][UOHSS5JcBK]Kk[NX=Uf?["
  547.     A$ = A$ + "m^_>glklc^T3?X[WahJcO8Yc6OiW<Xdi#foAilCSI^<[UX<B<Bkn][om9IYG"
  548.     A$ = A$ + "eW=XdQHdN>]PSIOCn1;H>^nmdI`?4I?[0bO6W<n9LOiiOPKZdcOVOc_aYNPK"
  549.     A$ = A$ + "aLZ5ZOhjObkeU6llTn7^RKlLbeeK?;Y]?o6i3mm?SL73IAe[M]l33;F:cf??"
  550.     A$ = A$ + "c_lZBjM_jYkg93A;n_Of^hVnI`hPNcGJE1U><V5fWFlkn5]X<B<bl<aNdPn6"
  551.     A$ = A$ + "5R>P9dJUWC<fN:kMVl3OeEMWEROjOfH7aP[\fZeJMS;JMoGma]5Nb43Qh7RV"
  552.     A$ = A$ + "hX7FB_jI;93Ok7#^mc\WU\N<h7bl9F6Z8mHTOHca?TlUaZ6cecL#il33L<Gf"
  553.     A$ = A$ + "nFUiT[XUl3g\Vg1<j:U1l2iN2kAVVUHmE\lWa>Ka#8b6c;S;IIOgS?GG[l3;"
  554.     A$ = A$ + "gH]c^O8mA<V[O#3HKLe[2A_bSo;MY1oF?cgLA;i7^IM17kniRo]Ygmdi5aN2"
  555.     A$ = A$ + "Tm>HcDWiWNRE^?bjZ4ZOX]WIHnohi#NTl3;gH]c^O8]?NSGHU1U6fh_hgYS9"
  556.     A$ = A$ + "6`?TiDZXEG=o`#O>Q^^cNVEnm;^O`hE3A\n5LoPmfINEjiaTHPe39DAlSOh]"
  557.     A$ = A$ + "NaOZLMMb?\LSe^2nQ?ob^aPB3K\?\6JQX[j;<m:mAUbKA[^JnQToOYSLb1M]"
  558.     A$ = A$ + "\6WFm<Fo:fgeQ8kNacl[n>inJGcMNeE^?bJQ0QZcn8VTK^JnNWc\bee9o`b="
  559.     A$ = A$ + "Fk8k7JYMm0_X#g7:hcPO8kU[#DJo#V_m#DF;SMEl31F_fl:f;jV?0cg;[UB8"
  560.     A$ = A$ + "R[UdIQcOVinJ]OO2`CVeB;DaHViIjUoi?`LMM5UOHjj4e3i7V?eNj7bjH#o3"
  561.     A$ = A$ + "3M?g`k80[a7kgi#TEWRHh1oW?UPBS\DW\_mYG^a9nKnW>VXRc>2nQl<kI_g5"
  562.     A$ = A$ + "Uk[elRH?f`mR#g_Wfm1fSaQ630ca2eMRASKGgNglRV7e\m3?lY>JgN=BkgV\"
  563.     A$ = A$ + "YVQO8cc2kg<F;Ib73f3G0iI8Rj4D_nB>YY4decljKnEQ^?`JDILFCNGLmYQj"
  564.     A$ = A$ + "nQjifAb?TiJ=Tig`lR86`?LegnU5L<PWL8o6ZmnT3llPn86SH<cWaQ]GijJ:"
  565.     A$ = A$ + "3o#V;CfCWdoPdem`;Te#RgU6^O9o`hRUR:]aWhXWnHC>gSJb^l`Pa[POFNWC"
  566.     A$ = A$ + "JC<NGlJ2M]#\hSn7^R5?oXBSJE6a[Vi]WnR`kdK8ZSVOH8_[hVO8[[<o68oi"
  567.     A$ = A$ + "HRQl^^^Y_NPj=aj7bL\LlOb?F^^Vb`?TmL=nNGda_oKAM?jG8NQdVn>oVi_n"
  568.     A$ = A$ + "Rl3;7o#jc4n4<W?Tn6hC#M2l4oX?hmbMjSO8me8Tm:SeG1j[1m?LUgliWkd0"
  569.     A$ = A$ + "eXb8Nmd?dHNgmkXi76bk:^i7BnSOhCm;nfA53Q>G\fmAZg#OjSA<?Z7a1>VL"
  570.     A$ = A$ + "M=UQO8[W8]5H>4BGgSa8Co2a;\8>SKTOHa<OC<_cdG#jK#jc=D>K_i\7Tei;"
  571.     A$ = A$ + "Tm?1_oKdf:4_<[m9mCPeT9D_Z6E6]g?=n_QNf>eEc?TkE?eML5A53Lnn4je3"
  572.     A$ = A$ + "D_9Fo#DNW[WRf?TeZSniJ_c=Y[gE[cI=i76F\DD]O`_Qn0Vnl3e>3OiMkWo<"
  573.     A$ = A$ + "WkFiEd6Sdh5N`K>gG;NYflnAJ4jiKCN:Sb?LckmX^:nQoiGlabeonRf?Taf#"
  574.     A$ = A$ + "j`_5KWo]Mg?O\kXj7bc<N?]h<8Pg7>>;?J[c9h#c3JSQ?D8W90fN]QjAD_9d"
  575.     A$ = A$ + "ig??UAi7faa?TH8dmaO<ZXl3YN0W=4l^3bI86Y3SaQjH\g>]bYl3cW:Co`jY"
  576.     A$ = A$ + "Z?WP3Ym1SaVe2Qg=el:6[NAdn\NZX>;TUOhF73Mgm3[WNY7mWFYL6ciY^l3K"
  577.     A$ = A$ + "NnQY?WPY?JQN>`aLg5R\jU\F7a\NWeC5eIQ\l3gjH#nQeFlMWa:WL^7ZeC9k"
  578.     A$ = A$ + "Zmb?d>WPa?Sed8djVQ>7#fki0kC6F[AnVKDdZX>;TUOhF73b?\fRjIFiTmk0"
  579.     A$ = A$ + "WUMjk5#fDkUOHjclIkM5Pcgml:fS;Q8;_InXaKL]gc23:MZW:Zc2Ii7^eaPl"
  580.     A$ = A$ + "3[]HnI\b9_kFlmkAO_0bVJ_l3COV?SG8mOjMN]W;gY3WgoiEYO_]HmHXNi_O"
  581.     A$ = A$ + "YGO^CW6YRj\#FnQKM<8o`J[dWS?lnc\X_dWdMn_;o`hRUbd?<MKLkM[Wi1>_"
  582.     A$ = A$ + ":TcPodnQFkR#?SMZW:SmN[l3UOHST]g9PCnP7_kMDQ_aNb?<^HYIk76jg4Zl"
  583.     A$ = A$ + "ZdeG\mQFIlMl#nQKFb?d;i7Fko]b?L;m3;[_5]E[;n4nhEbKkmfZ<lRUOhVU"
  584.     A$ = A$ + "l3mBnQenO[l3g\O8DFW=Ve;_]g[oo`3M;UFn8o#i7JBnQenOKGMo#J3D;\cJ"
  585.     A$ = A$ + ";Pj5a\WKb[X_XYcKF?W#of6UUbXl3UOXYRb?T_m?eZNgWK>C#nQM0m3]d^AH"
  586.     A$ = A$ + "kg6lY2iLM8VhbbkGJ5gFdYE]`F3kOkR>mPb3i7^ea#gMo`\NN`bIO3OkJdj;"
  587.     A$ = A$ + "W=eA`?TiccnNW]aGiY3:_bZhKRDjl>Vef6UUbWef;f_I8b?DnQEW>=2nNg`n"
  588.     A$ = A$ + "_Ako`\YVQO8Wg6ko7Kh9cMo6Yk\?`hhViNhJOcgJ8kkQKIo]`<mN]QjDdg#R"
  589.     A$ = A$ + "_e]bK?Xd;;UAKnAkZLN`:o``EIh7>aA?<gIX4W7fFm^SiC<fT_`Q?AgggUUL"
  590.     A$ = A$ + "QcEW7\ID=3o#NNM2cJL^m:oELJ7D5HNOI_RBNbIgFXW[3iAhUHa5eQX_QhUE"
  591.     A$ = A$ + "VUAk<HR_YBQ8i7^ea#kQOHXkWndZ<l3i<Yml>jmaMNHKek^bcHJ^a9cI4;cM"
  592.     A$ = A$ + "XNoUcVJ6nQl\klo\kS[OklnUK`Ig;?[hg^8_`c8dc0V\Zd[m6_o8fgMbb\<J"
  593.     A$ = A$ + "mmm9^e_F#iQl3gjHXm`?Tj>al=X6E6nQWnQ^W^aHaIaNjjMLncahTiMG^8>S"
  594.     A$ = A$ + "KTOHiUfE3i3k3`Rh<j\Nb>W_\OGUcM6X<;SfmAMNOeig?<d_ARVjX]7\TOHf"
  595.     A$ = A$ + "SUVYO8WcndFQnZmAOhV2:obRBG?RifSlDnQI_\fMg?l`Vb^5DnJBnQenOK75"
  596.     A$ = A$ + "o`JmmoHbkn>h6[GImmCaRMnoW^\DVkiVd[m6k5QR`?\AUAknH\nQan]bXXl3"
  597.     A$ = A$ + "gd6GO^_fZm3iKCG<a#8nQ\WmRe?<V_QmXVeg?UZKK9o`\9[nEKmmoPkUke^="
  598.     A$ = A$ + "dB9]K[_c3FIiEGeM5Dne8Unk_;`gXAb_HFGk\D6]jWaj76kg:SRX^2]o2AEk"
  599.     A$ = A$ + "76cg7?RQ#l3[nLl8_c=S=gc?i?obcMNKZIlmC9Mm2:Wb?<kRj8?km^8gHPf`"
  600.     A$ = A$ + "JG^KooagAAPm72[1KITf`[m<gOUk55AI9;aSUOCIL3g]VLfnN\<;SDW<6o#j"
  601.     A$ = A$ + "GcJ_k[cm>FoJ?mBCN[e]JWg>YOjc2iVQO8O?Y3A5UO8]kiK4A<SI72ik95nQ"
  602.     A$ = A$ + "lkNO_cIFi>_=ET_O:eZ>QAF[G8o`\YENCWWkKhJX_;K=B_m[^V:g;HocKkiV"
  603.     A$ = A$ + "bJ=VoM;i;_5gkikg]=_UUU7\E6IlbTo5]hK3_EVJdJ96KMUHROkkI8g[YO;o"
  604.     A$ = A$ + "P5<WPB7F?<jCdK_ne6L<4SO8Gk<Vd8bMNKZIln;Kb:[\7>H^5SM?gdMg?TkO"
  605.     A$ = A$ + "O[COJ^O7Z<dOjiOd:g;h<l5?3jWOXkKi6Ydke6JGaih?nQUIOB]b8n0QnnjE"
  606.     A$ = A$ + "?ajBHUY6]Gc:knOG?UnN?nIL^2monn_K^C7j3DXonLKM^6U7IU1jOJXcaMkQ"
  607.     A$ = A$ + "O8k1<nV14kj]dMg?lb>U3`]?g3mknASdjFi?_bm2Z[bHQH>h:[mLCjgcMf;o"
  608.     A$ = A$ + "\gma3^<m8\b8U;f?H5]NP[mTZDVJdkR#75o#K]<n?NZk[Y63Y?7?\ceXl8[<"
  609.     A$ = A$ + "POn:Fll3:6J?l3IOabHlYnWl33GlMoH2SJX9;kJ>a2?]AL6mWN]N]gE4hoi]"
  610.     A$ = A$ + "Om2?oB_75>jY?FGmkbf?d:Sh1`gfWRFhoIUY6m^ZfNj7VnN?n0h7n8g`Iedb"
  611.     A$ = A$ + "O>ocC_FJ43Qj7Bo33ikD1Zm`?Tjjl>[#O4UOHhRi9Qj]d?kb#[i>_j:g;>b3"
  612.     A$ = A$ + "J<^aVKSO]<fc=YkO`9=kai>7T:Ko#[<BK8joFA[_kI=S]hgDZgIIBkYOXmm<"
  613.     A$ = A$ + "d6[:#M;VgoVQfka<\]`?TaP`k^NNTi7bn[ReEi3O_g:gaAkQOh\Vl^hF7<No"
  614.     A$ = A$ + "ETOHhRWMD_UnKD6:mjmakP>o6FIj?U^m0OWMH<4\6>=Sed6o#VoQRFii\o\m"
  615.     A$ = A$ + "b?<mjHT^_Ih7bhmoKKj];elWn5U>oYMWMnbU7Ig[Ion`ja4bhmK?l3;2O6i7"
  616.     A$ = A$ + "fnj7bn8Y8EjmR[=fBfCob?\L5ggCgg#kN_=GafnVl3Ngg\DboZ7W\=nAkmd<"
  617.     A$ = A$ + "?b^G?^MMkM];Fa=N>i>NTOHi6WMEm3;jmLCjljPfcFC^PSMoL[7KcJ??fMd?"
  618.     A$ = A$ + "\]l2IMmY>?[g>oMh7bH?I\L_ok\Q2=oilXYJ_#Jcag\KKOhW7Uf?Tn76bN6B"
  619.     A$ = A$ + "nQUKLfEd?TeCIi;lD;dl:]_1kaLkn^l3;NanD<mJiW6RAVcC>oEH_`WfCTWo"
  620.     A$ = A$ + "[jWNYAWoL6dTnLk`0?8bOKMd2e?48VY]aOm=OULU6b?\LScdWCF\_\Fc_nJL"
  621.     A$ = A$ + "W3c<W9\NVl<<D\eOh\VgTLk_0>onH?dE4Y=T^=Si7bHHH^^Yn6WQo[mNFXKL"
  622.     A$ = A$ + "9\G1h\B<dl:mjKbil5NC\Gc;ckOY;S<WCLnL^jOfgdiAbNHROWQe3>Vd?Mi:"
  623.     A$ = A$ + ";nQUAIUm:5aAS>cV?ZY]k^ieWnUKk98cC<mo>^WaOojGmMW[foec7VgQLf_4"
  624.     A$ = A$ + "GjWKZ^eTWi9a>WghK=;gCHO\cLXTUkefJ2AMCfO^I]>ZeV2o#[_6l\Pi7ZXZ"
  625.     A$ = A$ + "CHdMd?Th3_SjE?\c0\?7i<\TbCe]?:JXM1eGX?:ME^o1L>hQ_F]FOif[bjD7"
  626.     A$ = A$ + "o>iNnR_9n=E_WaaC\Faeh7i#Z\giI?^DMKNnkBo]9[]0O<>[Na;lV_PihlLR"
  627.     A$ = A$ + "mN1eAIO86cm56c#chn_Mo[k`j;G_jBMVPn>aN5QOS]\;CLn8aJ;S_AGUkO0k"
  628.     A$ = A$ + "kFlKZen?\IFFa3Jfkc^jFkRcn8VTK_6al]E_gO6J[ahV;ZHP_O3\_k9oI_LA"
  629.     A$ = A$ + "oBiI>iO\g;H]PR=FSe?=[`_5`_M`i4KGMo`d`n4TdRO7Uf6dO163E<`nBQc0"
  630.     A$ = A$ + "OVc7l#X?L5EJ3\WiHm6Ym2eGCgFVa_Po8SOPnFPWI<ieWo#fCgIh0e=hnDe_"
  631.     A$ = A$ + "oBUam_Z;Sh9L;OU3ae?>^_bmgHCORCRGRkfZLe\Z[`HE9M`oQdTjfDOQWOdg"
  632.     A$ = A$ + "4NffXgQFNo[acTi=94o6lQYo#h3cll#O2YN;c=2S1_]bOb?nM4RG>cSbkmJ:"
  633.     A$ = A$ + "Gd_C>_nigJiiMFJCAM0lX8=hoFTe9<Xl#ibjGNg9o#NFc_oAjAiWk_<OBa0c"
  634.     A$ = A$ + "72_KafIANAVf0m9Tf;<W>llRf3Eg^UaeR?2aB<i5a<a>U1[O2Umm_Z;Sh_CN"
  635.     A$ = A$ + "`LfameH;CIYLe\Z[#iTbc=LNcfi?#Jcc^lNVeC\Qg5eg8M8]a[1_2nM5l;`k"
  636.     A$ = A$ + "=]?<oF7nO;hHfGgLDJn`fmTZ[GeFea8_JdcSfjN]iQc_cAIWk3IY=5e1<?Jn"
  637.     A$ = A$ + "_5IMRdi5U;:OM7NoUK[jBf_Iac;N>53T6TFTVlL_8CkdY_E_Xjf<lW9Oi_?f"
  638.     A$ = A$ + "l<MIYFN65mm_Z;SDF\f#UacXlL6VDTUE^nfZLF4eU9ma[PO?1_8j_GJ?WHmQ"
  639.     A$ = A$ + "cCM\JM_>?g;]d8mmXR^>AjlbNN4kg#U>SnQ2AGAX]LeN>V_Aen`5ag>9aFSl"
  640.     A$ = A$ + "352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q"
  641.     A$ = A$ + "`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl3"
  642.     A$ = A$ + "52Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`"
  643.     A$ = A$ + "Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl35"
  644.     A$ = A$ + "2Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`Sl352Q`CIj7fB;]T<`neWT"
  645.     A$ = A$ + "F7b0B6M[3bUG2Q#dAU9_kk#bHJM`UROH_jI;93X_m>IH3Zo9kl#7XcgE84R>"
  646.     A$ = A$ + "ZPGh46e#;Lo#999Y^bBnQBBBBN9o#9999_TOXTTTTGb?DBBBb;i7:999iUl3"
  647.     A$ = A$ + "UTTTlBnQBBBBN9o#9999_<o#Q#84m8io3\Pl%%h1"
  648.     btemp$ = ""
  649.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  650.         IF INSTR(1, B$, "%") THEN
  651.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  652.                 IF F$ <> "%" THEN C$ = C$ + F$
  653.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  654.             IF MID$(B$, j, 1) = "#" THEN
  655.         MID$(B$, j) = "@": END IF: NEXT
  656.         FOR t% = LEN(B$) TO 1 STEP -1
  657.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  658.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  659.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  660.     NEXT: btemp$ = btemp$ + X$: NEXT
  661.     btemp$ = _INFLATE$(btemp$)
  662.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  663.     BASIMAGE3& = _COPYIMAGE(v&): _FREEIMAGE v&
  664.  
  665.  
  666. FUNCTION BASIMAGE6& 'face.bmp
  667.     v& = _NEWIMAGE(300, 297, 32)
  668.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  669.     A$ = ""
  670.     A$ = A$ + "haIkMfm\EETN6744##4icPX8OZPL>la1144H0oX6n#A5DI6M`AL01RO05C=>"
  671.     A$ = A$ + "EVJVYL\HZA;]LB=Y8CUo1b]iRDi^DifTZb=YZLMZD9GTkB^:gk>n\>I]MMfL"
  672.     A$ = A$ + "fWmN]gMg?__ModEm[VB75g[nmmmgZGmZGMgYSJZYVJZYVJZYVJZYVJZYVJZY"
  673.     A$ = A$ + "VJZYVJZ5cfOkMN5Q#8XQlE2Q`;dVfc>a642QP6bG942_PlE2Q`;<Zn:f?7[#"
  674.     A$ = A$ + "8:3T_B84N1i[42QG#n:Q#h5T_Bd6nT;ndM^k7Mb>ckKc1Hc_mmNf>GkUVTNO"
  675.     A$ = A$ + "R8M8OUH^h[^faYkUJ3ghLkQNOV8N8OUhf_nDdm<Y0LMb^_F<N8OEi2Ko1CHg"
  676.     A$ = A$ + "g;6=T_Z<P]O`3`>696<bGUg`f1hAH7c4m7i[b7^bIVPN]N>bkMj9X7K5CSlE"
  677.     A$ = A$ + "i1\[Y;1H7S5bGiE:UgYWEiFG#_[A68OUoPM]ZhkPM^#YQlEfW?kM?2mjBaP1"
  678.     A$ = A$ + "a9fi:i>bGICnU_m1YGo96Mn5_e1YW3US8OUmPM]V8<liGiXdcUb=T_b6leGg"
  679.     A$ = A$ + "GOWNRf1n><IWSU38O5O`n<0kj9Ali>GFc_ehRlELhZWMBje?2NPef;kL#?Rl"
  680.     A$ = A$ + "ELPMmRP?\c1m8bGU>`c3`^6AH?n=oh3C?gd;8OEJPM=Q`f`>od;8OELa:kM`"
  681.     A$ = A$ + "2O0klE[SlEa5fio2o1kLF;SlEQ7fikRl0m>4_GT_:L`>oFT_`>gf:8OEhPM>"
  682.     A$ = A$ + "]8OQM^]E#n:iY4n1fij\AnZA7\W]a>oEDNlQ_jNYWk;OU_PM>[#`^6#n:O0k"
  683.     A$ = A$ + "lDQ0DRW36bG9GU`g`^V#n:K2klBQXO`^f#n:k`Wn>?3mlAQH#l[nA7RN]RlE"
  684.     A$ = A$ + "LQM>X#dFHGc8OULE2AKPM]SlEbE94]1fe#bG9?U#d6HG?9OULE2AKhSO]lIm"
  685.     A$ = A$ + "`;OULERl7feGbG5>dim^X40WIh\[eT_JlQMNT#T:HG[9OeXc_nBJMP::?nio"
  686.     A$ = A$ + "P3#_fCnZf3kl6QP5\[mT_Jh1OGk\cG42f`^>DnZQ3fi92QEPM]XlEbE94]1f"
  687.     A$ = A$ + "eTbG9GU#d6HGK:OULE2AKPM=ZlEbE94]1feZbG9OU#<\`^F]TmE\Sm2Q7QMM"
  688.     A$ = A$ + "[lEnT]\nEdINcKN35GnDkRn_gLVZngQ8>\d5_`>?gnf8mO_S;\[M;=O5khMK"
  689.     A$ = A$ + "II;in7Jgd`BeOV6hJcKXHad`^6Fn:ka>fh:3N]A_DmO33L]JNRLL`Ka2fe`U"
  690.     A$ = A$ + "P_j[_naY7W74oEgjiCB]a\aaVL3d_n]4WH??:]HaOi7oLd_n74o^ObcB_V>W"
  691.     A$ = A$ + "mE\S_32<o6\Z?ZiMNaWRNoP5Xjk8UL\X:O`0m5c5\[YcEO5khjL2ijRISm\e"
  692.     A$ = A$ + "e`_OQ0ko9F7mnnk13d_<G`^f>glE\SWc5WnPKVOmPS[E2:\k[W3NQY\kkElV"
  693.     A$ = A$ + "WOOd[aU_Z\[?JbNgfJigG5A>h>nCXg7kmkO`^6?GlE\SSmS]]QQOmCI2<#OF"
  694.     A$ = A$ + "dPMOK;HC[Kilk_V5HGWW3n:fa`I3\_nc>WODi3OemB_oCaRieIQ;hnXgg=KL"
  695.     A$ = A$ + "W;O4i[6A^jIWTNl[Gnl[LDjijS;odgHodk7E\`^a2i[bWaFa>o>H`^ODaR^D"
  696.     A$ = A$ + "iMIgGf3bG9GUeh?NcWWOOZR5V=F8OUOmEKL];WN>MXIM?lBYg_ZHQMS5bGiC"
  697.     A$ = A$ + "G5kLiHR7nnV:UHA5\kOk1i[LV[:c[AFbRFHWo`7L2nma:FDQeR5bGi<OU1bQ"
  698.     A$ = A$ + "C2\kWE\X;OaE?6onj68Oe\c_j7M8jaVVLZ3\9ji^YRolodC#_oFnZYYjkOTM"
  699.     A$ = A$ + "OM3^m[?UlEmP9gk=<#^KZHW?nZjlU__]^_NC#N8knXDReR5bG=CH7?:MO5hc"
  700.     A$ = A$ + "NgS`_?OFXjk4f0m?UL\#n:Sk[<#>;3n;n`Cb__Ga2C6;T_bV^ZUo0QOomf;l"
  701.     A$ = A$ + "Kna7^cMo8KEW`^?AaRdi\T_Be7]1l>?nZ[IWeTE9n\PF=F8OU1MEMB[_2OWn"
  702.     A$ = A$ + "cEkOkOl_Ij_Uo4mk1S]lGOYWQO<`PaR>9ngSiR5MR_cBn:kFSlOn_lg?daSD"
  703.     A$ = A$ + "FWPmX5;<g93kI2HXHHKWk`K9Ya2fa1i[\[[:5WA1gj2CeZHAcF:ZA`i1:>gD"
  704.     A$ = A$ + "H7;\VWRE\`R[=>i[\1[HI;f\e7XMaClTAog7>CG`LmBO=aU0O0j?]N\`J[5["
  705.     A$ = A$ + "BdGmcNCk]?UURJToQkNmF57V]6nc8fo>=aLmZHA5H]HEMVFb<Fd3GoUgMAi["
  706.     A$ = A$ + "HgOcZ69D]HoklGlF7Ton8WR5ElY_ccHRiC\G:5O5knIES<HncnQ7XjI2E\PO"
  707.     A$ = A$ + "\0ci^5OV`Hh\T_b>e8hJ?D]Zna8nKmWo3>0ogU^R5EPajJRgoa\PlEi[_:d]"
  708.     A$ = A$ + "Hk[Xo^dE\X2<FG[mm4F:n:fm_Z6IhmEhnj:FHSH1V3;je6m1i[D=b`dT_ZLR"
  709.     A$ = A$ + "5dOfliPLeGa^OEe8][61?7RR5f8FH]mbbHi\T_Be8bGioHQlEcMCnZ`cDKO]"
  710.     A$ = A$ + "]:6<G=lWE\[AbiW7dKa2;olPiX_RMoY5ZA0QZ5kOWi^_bKa2[k[`j_GnZl[6"
  711.     A$ = A$ + "iKnV_YEaQI[Qo<BA=B>_N6lD\`4[MgQPLaGa^OdBe8hkGMLKh?SDh[X?W9:F"
  712.     A$ = A$ + "deGIeeOEXMFbGe>dn9cdkQ9X6QnJn91G[0[7;<agbi#RlEiIM2>SiJK[jLY;"
  713.     A$ = A$ + "1of`NWQ5^WnRFHJfGE]N\0?G>mm:SQ4_k[HgoIEOE=FLo#^N^[<agH[QR5MB"
  714.     A$ = A$ + "l_WjHQ9f;b6BT_:_[AJbodOmWfionohO]cokocoEWomoio^>[M5?#bo=l67O"
  715.     A$ = A$ + "kMOODonKlm:bH1jgAo?R38NPh2SO7eaROkkIc_eiHh\Hj[Hg_=ZDbWWGXn0H"
  716.     A$ = A$ + "Zm303d_`<FHam3Ii[<668OUE=RE>_9D\`0[YTA0i[B?;K9UgH\FbRFHgea`O"
  717.     A$ = A$ + "lV6Joge0m=<S5dkoK9bGYjTD#mJJgJ_klo`7L2jm=:F<lPOcbG9OE<i:WIR^"
  718.     A$ = A$ + "cc^5W_TBcIIiHa`PglE\k_2668g=Ee7H=GmeGg`[c73d?U2nhGK_f?F<0T_R"
  719.     A$ = A$ + "3?bZF6mlgHc:O`5gmi?\fi6UR5lkg75`lO:O59<#NL\h\7JcM[?<eJHX0S50"
  720.     A$ = A$ + "C^NB6AT_R3iljaZ^n0O[PEcAT1j_;eH1nfY[O^L?4;64bGaSZej]1bY39Gm\"
  721.     A$ = A$ + "CfM\ENikmX4R5gibnH_HH#h5OeGLE3lMW53<#NMXh8kjAjN_Ljk335N\0dLL"
  722.     A$ = A$ + "^NmM2f;hkNd3n:fmCa4\>nHWK?^\hkO1cHNBljljVKa2\FfmJ\XOHMOeeNY9"
  723.     A$ = A$ + "Yg75KF`m=OjiiS:cOnc_kcM`NoRYdS5_bAfJGG5R5i`LFe;FgGU;SUM#TZmV"
  724.     A$ = A$ + "Y#2f_DZ[?`HecUHU7S5Gl4?IgH1^gA^4;jUf^FgC]_RMoC:Y:7c0in33KK3["
  725.     A$ = A$ + "H6^:fmMQVM]YEA_?NHif_nDMWk#4;<anfC4An:k0Vo1fio3RcOd]=SkUW[e7"
  726.     A$ = A$ + "YH_\NLY>>0G5nFVceHACT_bPHPJQNI;[O5cXn0kkKVJOR92P[_]oX?<mnnNi"
  727.     A$ = A$ + "3Oem>SkIhUmgh#PlEf3LObM_UEC_^XOg;7Ok\VJ?R9RDMMJPnoJfiS_ZIl>0"
  728.     A$ = A$ + "cQgcAK#n:k2^_9nNEIEKPiaYimaQW:g7CEo0GgC\INg3YN=PFZNZJT_bfPjT"
  729.     A$ = A$ + "KL^mTdge>n_EM]AmHZ#mQWo6o31hjO?KM=9eCQH1V;]Vgg0_W\Bmn6FeGE2["
  730.     A$ = A$ + "mZf0FkOH>S`HLRalbgL]6FkX`maagG#YFKd?#o1NGLY<FPoKQhO^]6#K;FeG"
  731.     A$ = A$ + "m9GlYYggH=`mgA>;bQ3imiaOFh\Y[ggg4Z9U[Jf1NlD5;`HZ`o]:mag2`cJH"
  732.     A$ = A$ + "AO5kn5[cMoXCFU33_2bWANm=?onjLbmnHEcE?fk1`mYajj4O[nhmLmZ?kfZn"
  733.     A$ = A$ + "WYim^KFC0o4nc4oIcnjcCD7;#oGcHaQfij[jgAo?R38NPh2R?8>eKL#aRQ3i"
  734.     A$ = A$ + "[l;hN^Hn<`gfJ]kZ^V1d_JRjWg3okPiV2oIXJSa3doQnAdOfln83:>XHAk#n"
  735.     A$ = A$ + "Zl3\W^PWU3[KN0FS4hK:3om:UeRPE0^WjH1R3ea4lgcCkm>F1i[42QG#n:Q#"
  736.     A$ = A$ + "h5\V_:7f_Y52AL0ccWUlE\k?42QM1c7XlE2Q`;8OU#8l2bG942_PlE2Q`;8O"
  737.     A$ = A$ + "U#8l2bG942_PlE2Q`;8OU#8l2bG942_PlE]WcMh]Da;m<CcI?dV[hd7LJ>e1"
  738.     A$ = A$ + "fDW_oCohElRkOJNQYfH5?gnf8mOoVViJO]Sm_=;ch^W1bngo#RlE:g`4Xn_d"
  739.     A$ = A$ + "eoihnDi[BO^Qf[Q3DO9kOkF2i[T_:Bi6H?Z7kQNd_>8chNVTRcbEfG3VQa<W"
  740.     A$ = A$ + "l>Gn8^hLRFnZdWKl67OkEi7d_>LLOX77K#\0k9fSKO8fWVan6?k[U1QlES0S"
  741.     A$ = A$ + "I^1V7Nh[:ecX9L6<4BOEeIdX1^^H1>kHT_BnZnbHVK\S=^bZcGPRLoD?TS[Z"
  742.     A$ = A$ + "1Ee\\_f81Z_2Q_b3kGVbG=2<Vi6[Ji;YjLKZ8?c1RT_2hQiO96\QEoPSMO7>"
  743.     A$ = A$ + "[N`ic3k[U1QlES01Xf2ci#amN2SX[ZVRlI\3#o6lEOikO<nG;30i[hTOPcIL"
  744.     A$ = A$ + "Lf>AoJaImK3R_jJ5hIQLPlENX_Cn:>i7hLbd3i7F[OKHjGm`h4\Fo:lENhiY"
  745.     A$ = A$ + "]T_b3cgGXb?`I0\7V_P#aUNQMV4OeagmSF=fEfG_N:O4__FT?JmiW`JW?>od"
  746.     A$ = A$ + "gHodkCBAnA]_b3_oh#a^gbZCR_JS[MiESaRme[Wb7aj^5mIFomoLec>YYlE^"
  747.     A$ = A$ + "iI23#M56o=N7Qd_FB4E[AZ4h[VolWOEO[e[m25GnDkJ\kc^bIV`5S9MHM8bG"
  748.     A$ = A$ + "=CFk:NPa>71[g5?TS4:Flm_PTh[`cfPnF[o\=Q2<Nb#T;F]6i=`ecLQlES6O"
  749.     A$ = A$ + "aE?fHWS\W]^6G<6l#1f;MBQ_2?g9Zol`L7742#O6j_l`g7VlES>H=O>>i8hi"
  750.     A$ = A$ + "F`LHE:[Y1<GYY`GMQS]mZj_BYOMLk_FfB^o\J]]WJO5>cYIg_<<D=^X0LO]B"
  751.     A$ = A$ + "jM4V2O5jCalGiUlXaQ7JY;J\k_`LGQn<[_fJnj[OLCj[`N]2knVQVa<GYnkN"
  752.     A$ = A$ + "VneQCj_JS_Z8nf<3DoU76?:nn#]X_bC?CH8bGdL^7>Fd2WN^f[NfC3LmjQl_"
  753.     A$ = A$ + "Jo^eo>VJSo#nZhU_Xe:Dhh3OemFEkiQgeUEj;Q_2cS:m[U1PlEf8O1eHUbk8"
  754.     A$ = A$ + "<DmIm[^[N=RXg=Hkjgl`HlU_JlIe?dh_>\`j5bjceIX9d[MDlWGmceD:mUQh"
  755.     A$ = A$ + "I[aleSn<\G\anjI#8Oeh36KD8Zgl`kB>h4QaFQW[ajc3SUjo`i>7jcl#nWlE"
  756.     A$ = A$ + "f9_YXN6V6<^[=ke_bUfeEQi\ZDj33ajHXfckUme8i[23H_=NLcK`L^GD[3[V"
  757.     A$ = A$ + "4XaEQeW3m[57dWE3fCBAO7NF#?<oYFfGMmGNgdkOBIn3F[kNH>?S5h\=k=oN"
  758.     A$ = A$ + "?a0WG;loOmjG_NnZ`JGXh>Kd2dH[l`j45d6g13OUg6SE8bO:^ee#?Pj6L_N<"
  759.     A$ = A$ + "WPH?\JY;NQE_;2lM?Qoj?hEfCgJ\JG5nWg3eKF<O[^?d3^Ni[\Gn3XDVoUi2"
  760.     A$ = A$ + "\^dAo0FgoH>Y`h>aHX`o;foMZ?G?;Re_N4ceP_b;gSd3nZZm013dGUbL8?lN"
  761.     A$ = A$ + "JB9H?Q1c5<lChoe3ccB<YJ>>3X_b3c11^7U7lEUhH\#>Da]gS;6N2X[b;k7g"
  762.     A$ = A$ + "SRg#nZ1C8>cRaj?]XnnW5]S0hZZGK]hI\m`l?8OU]cWfnSn`l_>4VS3]ce7\"
  763.     A$ = A$ + "aFiYma8i[R81JljN9GBT#2hc2jUmKWAaI`dGi^_]R0UCETWmcRiV0j[beg;8"
  764.     A$ = A$ + "KOE9?6[Bj\cA<02X[b;WSLhI<T_:n\[=]ZPTKE]g?HP[71GN\elP19O2O[Ve"
  765.     A$ = A$ + "cc^7nfU6EOQlES01jnQJN\4QL\E0_\^6U_bOiH_mc_CGlmB8R3EkCZ1dGiU_"
  766.     A$ = A$ + "o6PGmENdI5RcW`JdjKX<Io?aj2F>dUNQMFiZl`jI_6i[B<1:G3hQgm\`^i?N"
  767.     A$ = A$ + "JNf1`]jIOUGjWSEn6N^0g]f>4V8oYNN[`kKf;[AVaaEH1OU77SEXN?QeDTkK"
  768.     A$ = A$ + ":5:Ho#;dn:?m^KT_R3HOK:T>;fG?R4#0cG`m<mdj3]6i[bSl??\^I4f9OYnM"
  769.     A$ = A$ + "2j]eNL>h[L[c:TS_jK1kK`d_V41WKMQY2N^RgVg:#8l4FaGiEWebFbm7dl#_"
  770.     A$ = A$ + "\6J4]P0VOPcV`jaFiYmh`#i8T_bFiS;IA;ToeS8H\l78\g?kC^hCgmK_QmeF"
  771.     A$ = A$ + "K#n:3AP7[o[LT]boJBH^lRjW34S]b3W[P=An:k#ec`5hlbZil`0GKRASZgOB"
  772.     A$ = A$ + "Pc9^jIWdU_C##>j[l\cZR0WONg?jTl_V4]VP_FGVgg]F[`c1j]e[G8m3FcGi"
  773.     A$ = A$ + "]g?k<82SoGO_>nRZWU?B?780O?8NjkQ0oVcIOU6SembKmLkPoeUHP4Se]#]["
  774.     A$ = A$ + "Znl^VmeHK9d^1i[2;E_Si8TcnNWN2jGKRn3N_Ma8^GOfGkY_YiVD2n:_k\Fd"
  775.     A$ = A$ + "27oco[ISCO`=CoJCL_LaClTA9NOUc<AgaFi]i\243_PlEAR8To2#o=m[=AG>"
  776.     A$ = A$ + "e1fDDRckN;[^kLFiag78XTlEbIeONXU^8nGKR>[HI;>JahJG5f_Ql`IOJ_4;"
  777.     A$ = A$ + "WPlEAV8U?G1k[]BV85C?gQgBgW1dck=JUX_b;kOnc5kI[[A>[<RZeKC4SWeS"
  778.     A$ = A$ + "[2k_aOikkclo?kM?BAj[0NLN6WERH>Nelkcnj[00O[aY`EQi[bCO;c=i>G>N"
  779.     A$ = A$ + "^:?h[0\S11QH>6;=>;g73?iNO\^?7XW>k8jUHk2T_:M\nE^Di]l8A>V]ZU_T"
  780.     A$ = A$ + "^S]jgmClejG_GT_:OlEY8gO][#WMdQT7IE;;ja\Lhi0[AnZlcI5bcLPnAekJ"
  781.     A$ = A$ + "g0G[NUEnPaK]:D3b3ZMEH>ZmnNeH:l0bGAR8G;d5fGWNT45KZMEhK]aKkWEm"
  782.     A$ = A$ + "B:L0NbGUS>[D<>;i]6>^aifCbR5=7G5VOmLh\6AnZk5LO8faUPCZlEO;NlkU"
  783.     A$ = A$ + "=gR1=7GEmJ2UneoHb=?onT_Z#6S58VOG7mknkNoi?6G`NQHB7Okg2f;gKn<P"
  784.     A$ = A$ + "JLEbGiFBlmh1NmkXMLYJm=AXo^Y[bek;U=#nZ1C^nL=_kgoYXD71fhJG>m[o"
  785.     A$ = A$ + "HbVFgbYegRmLdLJ^e[1kOPbGEfScZjl_TDME=EOg96X_HL0c;DeIS6inbjcO"
  786.     A$ = A$ + ";<GEhn\idNb?SjNi[\7YNn\j7EW5\6XoX=Pki7jc`fAUVc[>nMUKk5obGe>b"
  787.     A$ = A$ + "nm8H3Dce;GoUg=onUoO`HE>fTKPNOB_P_aPLKNeK2[jM_k[bmaIQiiHQ;8>k"
  788.     A$ = A$ + "]bQPZi4R#obVGo3AoJ_OPm\jVOO=Ho:PMNDXAnZAW[mBCB?n5K`gYaFFo:XG"
  789.     A$ = A$ + ";fF`cU][=]Z>_c;nDMnI_inkkLgPonhoOl?g4KNeViiiJ[k^geEUWo^U]X[:"
  790.     A$ = A$ + "7lEinH\Z9FWk>R`#CG5F_4NL?<fj^ZLaGE:>;P5NoQRIgCQiD_:nHPl4i[VI"
  791.     A$ = A$ + "cJnZLjm4?8`nT[UW3WB0\NeJjZ`jod[kOaNaEUCnZJH7GC]gRMMKYa;^o7_X"
  792.     A$ = A$ + "lDFbE9OU_1cYeDKO]d[Q;9JjZ`JE0W9:NO?fCn:i\B9HM8RJX5LOYmkg]D0m"
  793.     A$ = A$ + "[Ol[]g^N:\>5`iPB^]n?]^[:GmEUXcZ6\oOOYGHWd[ac1nQWl9_WgkG^l]oi"
  794.     A$ = A$ + "AGE>k[:emN00NGj<ofYc1N[WK7cH=ZW[[AQn1F?L\[Q;9O5PM<W=hiE`j[6O"
  795.     A$ = A$ + "c]\[om0enYV[?1doE2?gGCHGgFZn:i\VfIQ_O=<n0;o]m`T;OZM=3GEmhY#o"
  796.     A$ = A$ + "FYiZT_R?\SoF1lN\`l4SJaZ_EL3h:\PSZnMmQaBmiGiXdSC<QM]ZlEIdIJOP"
  797.     A$ = A$ + "0c33VGN<7OWm#KV^k8UdlkA^iJXbkWCYQ0hZIG[:Oeg1kl1;2ZAAN:>ok`H<"
  798.     A$ = A$ + ">oAg6MWB81G?mjW`e9^NaeMYkXZQM]YlEbGe6`c:RjG<F3D?kmeQj]^`DcZW"
  799.     A$ = A$ + "2GOhj<gGSW]5feVbG9_eh0FWAH]KSm55lNb#m>ZkCaicn`2No1`[fd;ed=QO"
  800.     A$ = A$ + "gH?86G7UhlV?<`^FDn:i[29hk87_W<<Gd`MQil2^0h4`i>G:o^[ai_5n_G_S"
  801.     A$ = A$ + "MZike3>:lk4SQ:gfG?S1\[5U_Jh`Bk[_N4ha`lf3_`\ibZ7?F8Xn??lWMCWD"
  802.     A$ = A$ + "mkc3o>`NJ8kn4?1kj?i[J?XFPMNC^2Nn;h#`cERg?;f33PK1PWA[6hLJnGGo"
  803.     A$ = A$ + "?3nW7okQomQKD??Gh0S?UM]WlES6Ulg]SXl0gSVM=WlEbI9432_kZT_jkPM^"
  804.     A$ = A$ + "T#4C^m[kgW1DnZIW[Nflo\fADN`^^BnZh1kL;Q8d`^VBn:i]4R11kJ8i[T_B"
  805.     A$ = A$ + "86FHG39OUlF2aPPM=SlEbG9433HoVPM=SlElQMNX#<8HGS8OU]PMnX#d?HGK"
  806.     A$ = A$ + "8OU=YT>SD4f7\7D`^V#n:k3klDQPM=PlEn2fi[Rb5finbGiGHWk::7HW[c6i"
  807.     A$ = A$ + "[6OdN5W85Pm2<fij\AnZ`1klIAn2kLK[PlEQ7fifRl1fibF3i[R7\ce5n5fi"
  808.     A$ = A$ + "^F5i[R;\ck5n3fi\F6i[B3\[14f7fiXN0i[B3Gi<C#_N#HGHWOj5T_:m`^f#"
  809.     A$ = A$ + "H7HW;j=T_R7JoR_<1SeVM^WGAn:^`^fATNHWciIT_b6PcfHfeARh1R_\cab1"
  810.     A$ = A$ + "T_bF`^^B4NHWCUC8OU=iFGH:jeIRA74oHW3US8OU]QMMWXMTkkOj\An:o0kJ"
  811.     A$ = A$ + "AAoQM^AYPlEn3feV2iYHQlEn6fe[U6OnE>:mHN9SlEi1\[S;1H7S5bGU[`^f"
  812.     A$ = A$ + ">7PM<DL_8OEN3kJN?2kHVXo8OEIa=?onXk3\4XoPM<A<l8OUXDf[KdgI\oAn"
  813.     A$ = A$ + ":A_`f[4BHgG:2;bG9J3ghLkYj<#W]72l;Ok3B_o#TFT_B4:nR[N\XhU^m[[_"
  814.     A$ = A$ + "5?ad8OU#8l2bG942_PlE2Q`;8OU#8l2bG942_PlE2Q`;8OU#8l2bG942_PlE"
  815.     A$ = A$ + "2Q`;8OU#8l2Q`G942AZAn:Q#h5T_B84N1eDC=eDC=eDC=eDC=eDC=eDC=eDC"
  816.     A$ = A$ + "=eDC=eDC]b]momjB%%h1"
  817.     btemp$ = ""
  818.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  819.         IF INSTR(1, B$, "%") THEN
  820.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  821.                 IF F$ <> "%" THEN C$ = C$ + F$
  822.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  823.             IF MID$(B$, j, 1) = "#" THEN
  824.         MID$(B$, j) = "@": END IF: NEXT
  825.         FOR t% = LEN(B$) TO 1 STEP -1
  826.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  827.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  828.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  829.     NEXT: btemp$ = btemp$ + X$: NEXT
  830.     btemp$ = _INFLATE$(btemp$)
  831.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  832.     BASIMAGE6& = _COPYIMAGE(v&): _FREEIMAGE v&
  833.  

 
mazepaint.jpg
« Last Edit: August 25, 2020, 07:28:48 pm by Dav »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #20 on: August 25, 2020, 08:21:20 pm »
Hey nice variation!

FellippeHeitor

  • Guest
Re: MAZEBALL: Tilt Maze puzzle clone
« Reply #21 on: August 25, 2020, 08:21:59 pm »
Interesting twist!