Author Topic: 10x10 Puzzle Game (Woody clone)  (Read 10346 times)

0 Members and 1 Guest are viewing this topic.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #30 on: January 05, 2021, 08:02:37 am »
Well that beats me, @jack. I've only got in the 2000's so far.

I think there needs to be a more visual way to erase the lines, so I'll work on that next. Maybe flash them first.  Also think scores should be showing on the screen instead of title bar, so I'll need to add little more real estate to the window. Got some sound effects in mind. Not sure when i can do that - my wife is on my case right now wasting time with this programming stuff, so I gotta slow down for a little while. That 2am coding marathon wasn't a good idea...

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #31 on: January 05, 2021, 12:10:56 pm »
Quote
That 2am coding marathon wasn't a good idea...

Classic case of Muse Abuse!

Like you had a choice hahaha!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #32 on: January 05, 2021, 01:07:41 pm »
Hadn't heard of muse abuse before...had to look it up.  This year I'll try to be better...
 
btw @bplus,  I keep thinking of that Print7 LCD number thing you posted a while back.  It was really cool.
 Would you mind if I implemented that in this game for scoring? 

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #33 on: January 05, 2021, 01:19:49 pm »
Hadn't heard of muse abuse before...had to look it up.  This year I'll try to be better...
 
btw @bplus,  I keep thinking of that Print7 LCD number thing you posted a while back.  It was really cool.
 Would you mind if I implemented that in this game for scoring? 

- Dav

I think you asked before and you have my OK for anything you want to do with my stuff, people are going to do it anyway with or without, but nice to source ideas if you can.

I just looked up Muse Abuse on Internet, just after I made up that term, someone already had stolen my idea hahaha! but it is not what I had in mind. Now days it's the artist abusing his family and friends by using his living experience as source of inspiration for his "creations". I was thinking of Classic Greek meaning of Muse's taking over an artist life, when inspired they don't eat or sleep right and can be ruined by generally a good thing but carried too far.

Marked as best answer by Dav on January 05, 2021, 03:50:05 pm

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #34 on: January 05, 2021, 08:48:59 pm »
Here's a new version using the cyberbit.ttf font supplied with QB64 to show scores in the game.  I decided not to use Print7, @bplus because I wanted to display letters too.  I gave the game over window a little makeover too, and added some others fixes.  There's an error somewhere in the validation function - once I didn't have a move left, but it didn't catch it, so the game was stuck.

I'll post the new version here in case some rather have the original looking version...

Btw, does anyone know if cyberbit.ttf will be included in the official QB64 v1.5 release?  It wasn't in the dev build.
 
- Dav

Code: QB64: [Select]
  1. '=========
  2. '10x10.bas - v1.5
  3. '=========
  4. 'A 10x10 lines puzzle (Woody clone)
  5. 'Coded by Dav, JAN/2021
  6.  
  7. 'Follow this programs development here:
  8. 'https://www.qb64.org/forum/index.php?topic=3444.0
  9.  
  10. 'v1.5 changes: fixed: Removed external font call. Uses PPRINT.
  11.  
  12. '=====
  13. 'ABOUT:
  14. '=====
  15.  
  16. 'Clone of the Woody puzzle.  Drag pices onto the board
  17. 'to make completed rows or columns.  Completed lines erase.
  18. 'Bonus points are given for clearing more than one line at
  19. 'the same time. See how high a score you can get until you
  20. 'run out of space to make a move.
  21. '
  22. 'Hit SPACE to quit and restart game.
  23.  
  24.  
  25.  
  26. SCREEN _NEWIMAGE(800, 650, 32)
  27.  
  28. CLS , _RGB(162, 104, 78)
  29. ShowScore
  30.  
  31. _TITLE "10x10"
  32.  
  33. DIM SHARED rows, cols, size, piece1, piece2, piece3, score, hiscore
  34.  
  35. rows = 10: cols = 10: size = 60
  36.  
  37. DIM SHARED box(rows * cols)
  38. DIM SHARED box.x1(rows * cols), box.x2(rows * cols)
  39. DIM SHARED box.y1(rows * cols), box.y2(rows * cols)
  40. DIM SHARED darksquare&, litesquare&
  41.  
  42. darksquare& = BASIMAGE1&
  43. litesquare& = BASIMAGE2&
  44.  
  45. '============
  46. Restart:
  47. '============
  48.  
  49. score = 0
  50.  
  51. 'Init the box values
  52. bc = 1 'counter
  53. FOR c = 1 TO cols
  54.     FOR r = 1 TO rows
  55.         x = (r * size): y = 50 + (c * size)
  56.         box.x1(bc) = x - size: box.x2(bc) = x
  57.         box.y1(bc) = y - size: box.y2(bc) = y
  58.         box(bc) = 0 'set value to 0...means empty box
  59.         bc = bc + 1
  60.     NEXT
  61.  
  62. DrawHoldingPens
  63. UpdateBoard
  64.  
  65.     t = _MOUSEINPUT
  66.  
  67.         mx = _MOUSEX: my = _MOUSEY
  68.  
  69.         'if clicked holding pen 1
  70.         IF mx >= 610 AND mx <= 790 AND my >= 60 AND my <= 240 THEN
  71.             IF piece1 <> 0 THEN
  72.  
  73.                 'grab background in case restore needed
  74.                 undo& = _COPYIMAGE(_DISPLAY)
  75.  
  76.                 'clear holding pen 1
  77.                 LINE (610, 60)-(790, 240), _RGB(105, 14, 0), BF: _DISPLAY
  78.  
  79.                 back& = _COPYIMAGE(_DISPLAY)
  80.  
  81.                 'pickup piece, drag it around until mouse up
  82.                 DO
  83.                     'show piece in hand, over backgraound
  84.                     IF INT(RND * 3) = 0 THEN
  85.                         _PUTIMAGE (0, 0), back&
  86.                         '_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
  87.                         DrawPiece piece1, _MOUSEX, _MOUSEY
  88.                     END IF
  89.  
  90.                     'If user unclicked the button (let go)
  91.                     t2 = _MOUSEINPUT
  92.                     IF _MOUSEBUTTON(1) = 0 THEN
  93.                         mx2 = _MOUSEX: my2 = _MOUSEY
  94.  
  95.                         'see if unclicked over an empty box
  96.                         FOR r = 1 TO rows * cols
  97.                             IF mx2 >= box.x1(r) AND mx2 <= box.x2(r) AND my2 >= box.y1(r) AND my2 <= box.y2(r) THEN
  98.  
  99.                                 'If the piece fits...
  100.                                 IF Validate(piece1, r, 0) = 1 THEN
  101.                                     _PUTIMAGE (0, 0), back&: _DISPLAY
  102.                                     AddToScore piece1
  103.                                     piece1 = 0 'remove piece from pen
  104.                                 ELSE
  105.                                     curpiece = piece1
  106.                                     GOSUB PieceReturn
  107.                                     _PUTIMAGE (0, 0), undo&: _DISPLAY
  108.                                 END IF
  109.  
  110.                                 GOTO doneamove
  111.  
  112.                             END IF
  113.                         NEXT
  114.                         curpiece = piece1
  115.                         GOSUB PieceReturn
  116.  
  117.                         _PUTIMAGE (0, 0), undo&: _DISPLAY
  118.  
  119.                         GOTO doneamove
  120.  
  121.                     END IF
  122.  
  123.                 LOOP
  124.                 'please release me, let me go....
  125.                 _FREEIMAGE undo&
  126.                 _FREEIMAGE back&
  127.             END IF
  128.         END IF
  129.  
  130.         'if clicked holding pen 2
  131.         IF mx >= 610 AND mx <= 790 AND my >= 260 AND my <= 440 THEN
  132.             IF piece2 <> 0 THEN
  133.  
  134.                 'grab background in case restore needed
  135.                 undo& = _COPYIMAGE(_DISPLAY)
  136.  
  137.                 'clear holding pen 2
  138.                 LINE (610, 260)-(790, 440), _RGB(105, 14, 0), BF: _DISPLAY
  139.  
  140.                 back& = _COPYIMAGE(_DISPLAY)
  141.  
  142.                 'pickup piece, drag it around until mouse up
  143.                 DO
  144.                     'show piece in hand, over backgraound
  145.                     IF INT(RND * 3) = 0 THEN
  146.                         _PUTIMAGE (0, 0), back&
  147.                         '_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
  148.                         DrawPiece piece2, _MOUSEX, _MOUSEY
  149.                     END IF
  150.  
  151.                     'If user unclicked the button (let go)
  152.                     t2 = _MOUSEINPUT
  153.                     IF _MOUSEBUTTON(1) = 0 THEN
  154.                         mx2 = _MOUSEX: my2 = _MOUSEY
  155.  
  156.                         'see if unclicked over an empty box
  157.                         FOR r = 1 TO rows * cols
  158.                             IF mx2 >= box.x1(r) AND mx2 <= box.x2(r) AND my2 >= box.y1(r) AND my2 <= box.y2(r) THEN
  159.  
  160.                                 'If the piece fits...
  161.                                 IF Validate(piece2, r, 0) = 1 THEN
  162.                                     _PUTIMAGE (0, 0), back&: _DISPLAY
  163.                                     AddToScore piece2
  164.                                     piece2 = 0 'remove piece from pen
  165.                                 ELSE
  166.                                     curpiece = piece2
  167.                                     GOSUB PieceReturn
  168.                                     _PUTIMAGE (0, 0), undo&: _DISPLAY
  169.                                 END IF
  170.  
  171.                                 GOTO doneamove
  172.  
  173.                             END IF
  174.                         NEXT
  175.                         curpiece = piece2
  176.                         GOSUB PieceReturn
  177.  
  178.                         _PUTIMAGE (0, 0), undo&: _DISPLAY
  179.  
  180.                         GOTO doneamove
  181.  
  182.                     END IF
  183.  
  184.                 LOOP
  185.                 'please release me, let me go....
  186.                 _FREEIMAGE undo&
  187.                 _FREEIMAGE back&
  188.             END IF
  189.  
  190.         END IF
  191.  
  192.         'if clicked holding pen 3
  193.         IF mx >= 610 AND mx <= 790 AND my >= 460 AND my <= 640 THEN
  194.             IF piece3 <> 0 THEN
  195.  
  196.                 'grab background in case restore needed
  197.                 undo& = _COPYIMAGE(_DISPLAY)
  198.  
  199.                 'clear holding pen 3
  200.                 LINE (610, 460)-(790, 640), _RGB(105, 14, 0), BF: _DISPLAY
  201.  
  202.                 back& = _COPYIMAGE(_DISPLAY)
  203.  
  204.                 'pickup piece, drag it around until mouse up
  205.                 DO
  206.                     'show piece in hand, over backgraound
  207.                     IF INT(RND * 3) = 0 THEN
  208.                         _PUTIMAGE (0, 0), back&
  209.                         '_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
  210.                         DrawPiece piece3, _MOUSEX, _MOUSEY
  211.                     END IF
  212.  
  213.                     'If user unclicked the button (let go)
  214.                     t2 = _MOUSEINPUT
  215.                     IF _MOUSEBUTTON(1) = 0 THEN
  216.                         mx2 = _MOUSEX: my2 = _MOUSEY
  217.  
  218.                         'see if unclicked over an empty box
  219.                         FOR r = 1 TO rows * cols
  220.                             IF mx2 >= box.x1(r) AND mx2 <= box.x2(r) AND my2 >= box.y1(r) AND my2 <= box.y2(r) THEN
  221.  
  222.                                 'If the piece fits...
  223.                                 IF Validate(piece3, r, 0) = 1 THEN
  224.                                     _PUTIMAGE (0, 0), back&: _DISPLAY
  225.                                     AddToScore piece3
  226.                                     piece3 = 0 'remove piece from pen
  227.                                 ELSE
  228.                                     curpiece = piece3
  229.                                     GOSUB PieceReturn
  230.                                     _PUTIMAGE (0, 0), undo&: _DISPLAY
  231.                                 END IF
  232.  
  233.                                 GOTO doneamove
  234.  
  235.                             END IF
  236.                         NEXT
  237.                         curpiece = piece3
  238.                         GOSUB PieceReturn
  239.  
  240.                         _PUTIMAGE (0, 0), undo&: _DISPLAY
  241.  
  242.                         GOTO doneamove
  243.  
  244.                     END IF
  245.  
  246.                 LOOP
  247.                 'please release me, let me go....
  248.                 _FREEIMAGE undo&
  249.                 _FREEIMAGE back&
  250.             END IF
  251.  
  252.         END IF
  253.  
  254.         doneamove:
  255.  
  256.         'Get new pieces if all holding pens empty
  257.         IF piece1 = 0 AND piece2 = 0 AND piece3 = 0 THEN DrawHoldingPens
  258.  
  259.         UpdateBoard
  260.  
  261.         IF MovesLeft = 0 THEN
  262.             LINE (200, 175)-(525, 325), _RGBA(0, 0, 0, 150), BF
  263.             LINE (200, 175)-(525, 325), _RGB(255, 255, 255), B
  264.             LINE (199, 174)-(526, 326), _RGB(255, 255, 255), B
  265.             PPRINT 240, 200, 20, _RGB(255, 255, 255), 0, "NO MOVES LEFT!"
  266.             PPRINT 275, 240, 20, _RGB(255, 255, 255), 0, "Score:" + STR$(score)
  267.             IF score = hiscore THEN
  268.                 PPRINT 230, 280, 20, _RGB(255, 255, 0), 0, "NEW HIGH SCORE!"
  269.             END IF
  270.             _AUTODISPLAY
  271.             'wait until mouse click
  272.             DO: k = _MOUSEINPUT
  273.                 IF INKEY$ = CHR$(32) THEN EXIT DO
  274.             LOOP UNTIL _MOUSEBUTTON(1)
  275.             GOTO Restart
  276.         END IF
  277.  
  278.  
  279.     END IF
  280.  
  281.     IF INKEY$ = CHR$(32) THEN GOTO Restart:
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288. '============================
  289. '============
  290. PieceReturn:
  291.  
  292. 'animate sending piece back to original x/y
  293. cx = mx2: cy = my2
  294. xdone = 0: ydone = 0
  295.     IF mx2 > mx THEN
  296.         cx = cx - 12
  297.         IF cx < mx THEN
  298.             cx = mx: xdone = 1
  299.         END IF
  300.     ELSE
  301.         cx = cx + 12
  302.         IF cx > mx THEN
  303.             cx = mx: xdone = 1
  304.         END IF
  305.     END IF
  306.  
  307.     IF my2 > my THEN
  308.         cy = cy - 12
  309.         IF cy < my THEN
  310.             cy = my: ydone = 1
  311.         END IF
  312.     ELSE
  313.         cy = cy + 12
  314.         IF cy > my THEN
  315.             cy = my: ydone = 1
  316.         END IF
  317.  
  318.     END IF
  319.  
  320.     _PUTIMAGE (0, 0), back&
  321.     DrawPiece curpiece, cx - 20, cy - 20
  322.  
  323.     _DISPLAY
  324.  
  325.     _DELAY .0075
  326.  
  327. LOOP UNTIL xdone = 1 AND ydone = 1
  328.  
  329.  
  330. FUNCTION MovesLeft ()
  331.  
  332.     'Checks if moves are left
  333.  
  334.     MovesLeft = 0 'default none left until a move found
  335.  
  336.     'if there's a piece in holding pen 1
  337.     IF piece1 <> 0 THEN
  338.  
  339.         'run piece check on all open boxes
  340.         FOR r = 1 TO rows * cols
  341.             'test piece on box if empty
  342.             IF box(r) = 0 THEN
  343.                 IF Validate(piece1, r, 1) = 1 THEN
  344.                     MovesLeft = 1: EXIT FOR
  345.                 END IF
  346.             END IF
  347.         NEXT
  348.     END IF
  349.  
  350.     'if there's a piece in holding pen 2
  351.     IF piece2 <> 0 THEN
  352.         'run piece check on all open boxes
  353.         FOR r = 1 TO rows * cols
  354.             IF box(r) = 0 THEN
  355.                 IF Validate(piece2, r, 1) = 1 THEN
  356.                     MovesLeft = 1: EXIT FOR
  357.                 END IF
  358.             END IF
  359.         NEXT
  360.     END IF
  361.  
  362.     'if there's a piece in holding pen 3
  363.     IF piece3 <> 0 THEN
  364.         'run piece check on all open boxes
  365.         FOR r = 1 TO rows * cols
  366.             IF box(r) = 0 THEN
  367.                 IF Validate(piece3, r, 1) = 1 THEN
  368.                     MovesLeft = 1: EXIT FOR
  369.                 END IF
  370.             END IF
  371.         NEXT
  372.     END IF
  373.  
  374.  
  375.  
  376. SUB UpdateBoard
  377.  
  378.     bc = 1 'counter
  379.     FOR c = 1 TO cols
  380.         FOR r = 1 TO rows
  381.             IF box(bc) = 0 THEN
  382.                 _PUTIMAGE (box.x1(bc), box.y1(bc))-(box.x2(bc), box.y2(bc)), darksquare&
  383.             ELSE
  384.                 _PUTIMAGE (box.x1(bc), box.y1(bc))-(box.x2(bc), box.y2(bc)), litesquare&
  385.             END IF
  386.             bc = bc + 1
  387.         NEXT
  388.     NEXT
  389.  
  390.     _DISPLAY
  391.  
  392.     'Check for completed lines...add score
  393.     '10 points for clearing 1 row or col,
  394.     'bonus points for doing several at one time
  395.     tallyup = 0: bonus = 0
  396.     'scan for completed rows...
  397.     REDIM rowdo(10) AS INTEGER: rc = 1: rowhere = 0
  398.     FOR rw = 1 TO 100 STEP 10
  399.         IF RowDone(rw) THEN
  400.             'RowClear rw
  401.             rowdo(rc) = rw: rc = rc + 1: rowhere = 1
  402.             tallyup = tallyup + 10
  403.             bonus = bonus + 1
  404.         END IF
  405.     NEXT
  406.     'scan for completed columns...
  407.     REDIM coldo(10) AS INTEGER: cc = 1: colhere = 0
  408.     FOR c = 1 TO 10
  409.         IF ColDone(c) THEN
  410.             coldo(cc) = c: cc = cc + 1: colhere = 1
  411.             tallyup = tallyup + 10
  412.             bonus = bonus + 1
  413.             'ColClear c
  414.         END IF
  415.     NEXT
  416.     'Now do the erasing...
  417.     IF rowhere = 1 THEN
  418.         FOR e = 1 TO 10
  419.             IF rowdo(e) <> 0 THEN RowClear rowdo(e)
  420.         NEXT
  421.     END IF: ERASE rowdo
  422.     IF colhere = 1 THEN
  423.         FOR e = 1 TO 10
  424.             IF coldo(e) <> 0 THEN ColClear coldo(e)
  425.         NEXT
  426.     END IF: ERASE coldo
  427.  
  428.     score = score + (tallyup * bonus)
  429.  
  430.     IF score > hiscore THEN hiscore = score
  431.  
  432.     ShowScore
  433.  
  434.     _TITLE "10x10 - Your Score:" + STR$(score) + "  -  High Score:" + STR$(hiscore)
  435.  
  436.     _ICON _DISPLAY 'update app icon on taskbar
  437.  
  438.  
  439.  
  440. FUNCTION RowDone (row)
  441.     RowDone = 1
  442.     FOR r = row TO row + 9
  443.         IF box(r) = 0 THEN RowDone = 0
  444.     NEXT
  445.  
  446. SUB RowClear (row)
  447.     FOR r = row TO row + 9
  448.         LINE (box.x1(r), box.y1(r))-(box.x2(r), box.y2(r)), _RGB(255, 255, 255), BF
  449.         _DISPLAY: _DELAY .015
  450.         _PUTIMAGE (box.x1(r), box.y1(r))-(box.x2(r), box.y2(r)), darksquare&
  451.         _DISPLAY: _DELAY .005
  452.         box(r) = 0
  453.     NEXT
  454.  
  455. FUNCTION ColDone (col)
  456.     ColDone = 1
  457.     FOR c = col TO (rows * cols) STEP 10
  458.         IF box(c) = 0 THEN ColDone = 0
  459.     NEXT
  460.  
  461. SUB ColClear (col)
  462.     FOR r = col TO (rows * cols) STEP 10
  463.         LINE (box.x1(r), box.y1(r))-(box.x2(r), box.y2(r)), _RGB(255, 255, 255), BF
  464.         _DISPLAY: _DELAY .015
  465.         _PUTIMAGE (box.x1(r), box.y1(r))-(box.x2(r), box.y2(r)), darksquare&
  466.         _DISPLAY: _DELAY .005
  467.         box(r) = 0
  468.     NEXT
  469.  
  470. FUNCTION Validate (piece, num, checkonly)
  471.  
  472.     'This function validates if pieces fit
  473.     'if checkonly flag is on, then it just checks to see
  474.     'if checkonly flag = 0 then it checks and marks box() filled
  475.  
  476.     Validate = 0 'default not validated
  477.  
  478.     'one dot piece
  479.     IF piece = 1 THEN
  480.         IF box(num) = 0 THEN
  481.             IF checkonly = 0 THEN
  482.                 box(num) = 1
  483.             END IF
  484.             Validate = 1
  485.         END IF
  486.     END IF
  487.  
  488.     '2 dot horizonal
  489.     IF piece = 2 THEN
  490.         'don't validate if on the last box on right side
  491.         SELECT CASE num
  492.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  493.         END SELECT
  494.         'validate if this box and next box over is free
  495.         IF box(num) = 0 AND box(num + 1) = 0 THEN
  496.             IF checkonly = 0 THEN
  497.                 box(num) = 1: box(num + 1) = 1
  498.             END IF
  499.             Validate = 1
  500.         END IF
  501.     END IF
  502.  
  503.     '2 dot vertical
  504.     IF piece = 3 THEN
  505.         'don't validate if on bottom row
  506.         SELECT CASE num
  507.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  508.         END SELECT
  509.         'validate if this box and box below is free
  510.         IF box(num) = 0 AND box(num + 10) = 0 THEN
  511.             IF checkonly = 0 THEN
  512.                 box(num) = 1: box(num + 10) = 1
  513.             END IF
  514.             Validate = 1
  515.         END IF
  516.     END IF
  517.  
  518.     IF piece = 4 THEN '3 dots left/up
  519.         'dont validate if on top row
  520.         SELECT CASE num
  521.             CASE 1 TO 10: Validate = 0: EXIT FUNCTION
  522.         END SELECT
  523.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num - 9) = 0 THEN
  524.             IF checkonly = 0 THEN
  525.                 box(num) = 1: box(num + 1) = 1: box(num - 9) = 1
  526.             END IF
  527.             Validate = 1
  528.         END IF
  529.     END IF
  530.  
  531.     IF piece = 5 THEN '3 dots right/up
  532.         'don't validate bottom row
  533.         SELECT CASE num
  534.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  535.         END SELECT
  536.         'don't validate if on the last box on right side
  537.         SELECT CASE num
  538.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  539.         END SELECT
  540.         IF box(num) = 0 AND box(num + 10) = 0 AND box(num + 11) = 0 THEN
  541.             IF checkonly = 0 THEN
  542.                 box(num) = 1: box(num + 10) = 1: box(num + 11) = 1
  543.             END IF
  544.             Validate = 1
  545.         END IF
  546.     END IF
  547.  
  548.     IF piece = 6 THEN
  549.         'don't validate bottom row
  550.         SELECT CASE num
  551.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  552.         END SELECT
  553.         'don't validate if on the last box on right side
  554.         SELECT CASE num
  555.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  556.         END SELECT
  557.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 11) = 0 THEN
  558.             IF checkonly = 0 THEN
  559.                 box(num) = 1: box(num + 1) = 1: box(num + 11) = 1
  560.             END IF
  561.             Validate = 1
  562.         END IF
  563.     END IF
  564.  
  565.     IF piece = 7 THEN
  566.         'don't validate bottom row
  567.         SELECT CASE num
  568.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  569.         END SELECT
  570.         'don't validate if on the last box on right side
  571.         SELECT CASE num
  572.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  573.         END SELECT
  574.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 10) = 0 THEN
  575.             IF checkonly = 0 THEN
  576.                 box(num) = 1: box(num + 1) = 1: box(num + 10) = 1
  577.             END IF
  578.             Validate = 1
  579.         END IF
  580.     END IF
  581.  
  582.     IF piece = 8 THEN '3 dots horz
  583.         'don't validate if on the last 2 columns on right side
  584.         SELECT CASE num
  585.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  586.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  587.         END SELECT
  588.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 THEN
  589.             IF checkonly = 0 THEN
  590.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1
  591.             END IF
  592.             Validate = 1
  593.         END IF
  594.     END IF
  595.  
  596.     IF piece = 9 THEN '3 dots vert
  597.         'don't validate bottom 2 row
  598.         SELECT CASE num
  599.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  600.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  601.         END SELECT
  602.         IF box(num) = 0 AND box(num + 10) = 0 AND box(num + 20) = 0 THEN
  603.             IF checkonly = 0 THEN
  604.                 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1
  605.             END IF
  606.             Validate = 1
  607.         END IF
  608.     END IF
  609.  
  610.     IF piece = 10 THEN '4 dots block
  611.         'don't validate bottom row
  612.         SELECT CASE num
  613.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  614.         END SELECT
  615.         'don't validate if on the last box on right side
  616.         SELECT CASE num
  617.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  618.         END SELECT
  619.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 10) = 0 AND box(num + 11) = 0 THEN
  620.             IF checkonly = 0 THEN
  621.                 box(num) = 1: box(num + 1) = 1: box(num + 10) = 1: box(num + 11) = 1
  622.             END IF
  623.             Validate = 1
  624.         END IF
  625.     END IF
  626.  
  627.     IF piece = 11 THEN '4 dots horz
  628.         'don't validate if on the last 3 columns on right side
  629.         SELECT CASE num
  630.             CASE 8, 18, 28, 38, 48, 58, 68, 78, 88, 98: Validate = 0: EXIT FUNCTION
  631.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  632.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  633.         END SELECT
  634.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num + 3) = 0 THEN
  635.             IF checkonly = 0 THEN
  636.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 3) = 1
  637.             END IF
  638.             Validate = 1
  639.         END IF
  640.     END IF
  641.  
  642.     IF piece = 12 THEN '4 dots vert
  643.         'don't validate bottom 3 rows
  644.         SELECT CASE num
  645.             CASE 71 TO 80: Validate = 0: EXIT FUNCTION
  646.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  647.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  648.         END SELECT
  649.         IF box(num) = 0 AND box(num + 10) = 0 AND box(num + 20) = 0 AND box(num + 30) = 0 THEN
  650.             IF checkonly = 0 THEN
  651.                 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 30) = 1
  652.             END IF
  653.             Validate = 1
  654.         END IF
  655.     END IF
  656.  
  657.     IF piece = 13 THEN '5 dots horz
  658.         'don't validate if on the last 3 columns on right side
  659.         SELECT CASE num
  660.             CASE 7, 17, 27, 37, 47, 57, 67, 77, 87, 97: Validate = 0: EXIT FUNCTION
  661.             CASE 8, 18, 28, 38, 48, 58, 68, 78, 88, 98: Validate = 0: EXIT FUNCTION
  662.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  663.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  664.         END SELECT
  665.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num + 3) = 0 AND box(num + 4) = 0 THEN
  666.             IF checkonly = 0 THEN
  667.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 3) = 1: box(num + 4) = 1
  668.             END IF
  669.             Validate = 1
  670.         END IF
  671.     END IF
  672.  
  673.     IF piece = 14 THEN '5 dots vert
  674.         'don't validate bottom 4 rows
  675.         SELECT CASE num
  676.             CASE 61 TO 70: Validate = 0: EXIT FUNCTION
  677.             CASE 71 TO 80: Validate = 0: EXIT FUNCTION
  678.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  679.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  680.         END SELECT
  681.         IF box(num) = 0 AND box(num + 10) = 0 AND box(num + 20) = 0 AND box(num + 30) = 0 AND box(num + 40) = 0 THEN
  682.             IF checkonly = 0 THEN
  683.                 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 30) = 1: box(num + 40) = 1
  684.             END IF
  685.             Validate = 1
  686.         END IF
  687.     END IF
  688.  
  689.     IF piece = 15 THEN '5 dots left/up
  690.         'don't validate bottom 2 rows
  691.         SELECT CASE num
  692.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  693.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  694.         END SELECT
  695.         'don't validate if on the last 2 columns on right side
  696.         SELECT CASE num
  697.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  698.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  699.         END SELECT
  700.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num + 12) = 0 AND box(num + 22) = 0 THEN
  701.             IF checkonly = 0 THEN
  702.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 12) = 1: box(num + 22) = 1
  703.             END IF
  704.             Validate = 1
  705.         END IF
  706.     END IF
  707.  
  708.     IF piece = 16 THEN '5 dots right/up
  709.         'don't validate bottom 2 rows
  710.         SELECT CASE num
  711.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  712.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  713.         END SELECT
  714.         'don't validate if on the last 2 columns on right side
  715.         SELECT CASE num
  716.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  717.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  718.         END SELECT
  719.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num + 10) = 0 AND box(num + 20) = 0 THEN
  720.             IF checkonly = 0 THEN
  721.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 10) = 1: box(num + 20) = 1
  722.             END IF
  723.             Validate = 1
  724.         END IF
  725.     END IF
  726.  
  727.     IF piece = 17 THEN '5 dots right/down
  728.         'don't validate bottom 2 rows
  729.         SELECT CASE num
  730.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  731.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  732.         END SELECT
  733.         'don't validate if on the last 2 columns on right side
  734.         SELECT CASE num
  735.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  736.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  737.         END SELECT
  738.         IF box(num) = 0 AND box(num + 10) = 0 AND box(num + 20) = 0 AND box(num + 21) = 0 AND box(num + 22) = 0 THEN
  739.             IF checkonly = 0 THEN
  740.                 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 21) = 1: box(num + 22) = 1
  741.             END IF
  742.             Validate = 1
  743.         END IF
  744.     END IF
  745.  
  746.     IF piece = 18 THEN '5 dots left/down
  747.         'don't validate top 2 rows
  748.         SELECT CASE num
  749.             CASE 1 TO 10: Validate = 0: EXIT FUNCTION
  750.             CASE 11 TO 20: Validate = 0: EXIT FUNCTION
  751.         END SELECT
  752.         'don't validate if on the last 2 columns on right side
  753.         SELECT CASE num
  754.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  755.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  756.         END SELECT
  757.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num - 8) = 0 AND box(num - 18) = 0 THEN
  758.             IF checkonly = 0 THEN
  759.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num - 8) = 1: box(num - 18) = 1
  760.             END IF
  761.             Validate = 1
  762.         END IF
  763.     END IF
  764.  
  765.     IF piece = 19 THEN '9 dots big block
  766.         'don't validate bottom 2 rows
  767.         SELECT CASE num
  768.             CASE 81 TO 90: Validate = 0: EXIT FUNCTION
  769.             CASE 91 TO 100: Validate = 0: EXIT FUNCTION
  770.         END SELECT
  771.         'don't validate if on the last 2 columns on right side
  772.         SELECT CASE num
  773.             CASE 9, 19, 29, 39, 49, 59, 69, 79, 89, 99: Validate = 0: EXIT FUNCTION
  774.             CASE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100: Validate = 0: EXIT FUNCTION
  775.         END SELECT
  776.         IF box(num) = 0 AND box(num + 1) = 0 AND box(num + 2) = 0 AND box(num + 10) = 0 AND box(num + 11) = 0 AND box(num + 12) = 0 AND box(num + 20) = 0 AND box(num + 21) = 0 AND box(num + 22) = 0 THEN
  777.             IF checkonly = 0 THEN
  778.                 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 10) = 1: box(num + 11) = 1: box(num + 12) = 1: box(num + 20) = 1: box(num + 21) = 1: box(num + 22) = 1
  779.             END IF
  780.             Validate = 1
  781.         END IF
  782.     END IF
  783.  
  784.  
  785. SUB AddToScore (num)
  786.  
  787.     IF num = 1 THEN score = score + 1
  788.     IF num = 2 THEN score = score + 2
  789.     IF num = 3 THEN score = score + 2
  790.     IF num = 4 THEN score = score + 3
  791.     IF num = 5 THEN score = score + 3
  792.     IF num = 6 THEN score = score + 3
  793.     IF num = 7 THEN score = score + 3
  794.     IF num = 8 THEN score = score + 3
  795.     IF num = 9 THEN score = score + 3
  796.     IF num = 10 THEN score = score + 4
  797.     IF num = 11 THEN score = score + 4
  798.     IF num = 12 THEN score = score + 4
  799.     IF num = 13 THEN score = score + 5
  800.     IF num = 14 THEN score = score + 5
  801.     IF num = 15 THEN score = score + 5
  802.     IF num = 16 THEN score = score + 5
  803.     IF num = 17 THEN score = score + 5
  804.     IF num = 18 THEN score = score + 5
  805.     IF num = 19 THEN score = score + 9
  806.  
  807.  
  808. SUB DrawHoldingPens
  809.  
  810.     'Draws 3 holding pens, smaller version of pieces,
  811.     'and assigns random piece to each holding pen...
  812.  
  813.     'holding pen 1
  814.     LINE (610, 60)-(790, 240), _RGB(105, 14, 0), BF
  815.     'holding pen 2
  816.     LINE (610, 260)-(790, 440), _RGB(105, 14, 0), BF
  817.     'holding pen 3
  818.     LINE (610, 460)-(790, 640), _RGB(105, 14, 0), BF
  819.  
  820.     FOR pens = 1 TO 3
  821.  
  822.         'Get a random piece
  823.         'There are 19 total pieces to choose from
  824.         piece = INT(RND * 19) + 1
  825.  
  826.         'y offset vaule for the pens
  827.         IF pens = 1 THEN yo = 50
  828.         IF pens = 2 THEN yo = 250
  829.         IF pens = 3 THEN yo = 450
  830.  
  831.         IF piece = 1 THEN '1 dot
  832.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare&
  833.         END IF
  834.         IF piece = 2 THEN '2 dots horizonal
  835.             _PUTIMAGE (670, 85 + yo)-(700, 115 + yo), litesquare& 'mid
  836.             _PUTIMAGE (700, 85 + yo)-(730, 115 + yo), litesquare& 'right
  837.         END IF
  838.         IF piece = 3 THEN '2 dots vertical
  839.             _PUTIMAGE (685, 100 + yo)-(715, 130 + yo), litesquare& 'mid
  840.             _PUTIMAGE (685, 70 + yo)-(715, 100 + yo), litesquare& 'up
  841.         END IF
  842.         IF piece = 4 THEN '3 dots Left/Up
  843.             _PUTIMAGE (700, 100 + yo)-(730, 130 + yo), litesquare& 'mid
  844.             _PUTIMAGE (700, 70 + yo)-(730, 100 + yo), litesquare& 'up
  845.             _PUTIMAGE (670, 100 + yo)-(700, 130 + yo), litesquare& 'left
  846.         END IF
  847.         IF piece = 5 THEN '3 dots right/Up
  848.             _PUTIMAGE (670, 100 + yo)-(700, 130 + yo), litesquare& 'mid
  849.             _PUTIMAGE (670, 70 + yo)-(700, 100 + yo), litesquare& 'up
  850.             _PUTIMAGE (700, 100 + yo)-(730, 130 + yo), litesquare& 'right
  851.         END IF
  852.         IF piece = 6 THEN '3 dots Left/down
  853.             _PUTIMAGE (700, 70 + yo)-(730, 100 + yo), litesquare& 'mid
  854.             _PUTIMAGE (700, 100 + yo)-(730, 130 + yo), litesquare& 'down
  855.             _PUTIMAGE (670, 70 + yo)-(700, 100 + yo), litesquare& 'left
  856.         END IF
  857.         IF piece = 7 THEN '3 dots right/down
  858.             _PUTIMAGE (670, 70 + yo)-(700, 100 + yo), litesquare& 'mid
  859.             _PUTIMAGE (670, 100 + yo)-(700, 130 + yo), litesquare& 'down
  860.             _PUTIMAGE (700, 70 + yo)-(730, 100 + yo), litesquare& 'left
  861.         END IF
  862.         IF piece = 8 THEN '3 dots horizonal
  863.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare& 'mid
  864.             _PUTIMAGE (715, 85 + yo)-(745, 115 + yo), litesquare& 'right
  865.             _PUTIMAGE (655, 85 + yo)-(685, 115 + yo), litesquare& 'left
  866.         END IF
  867.         IF piece = 9 THEN '3 dots vertical
  868.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare& 'mid
  869.             _PUTIMAGE (685, 55 + yo)-(715, 85 + yo), litesquare& 'up
  870.             _PUTIMAGE (685, 115 + yo)-(715, 145 + yo), litesquare& 'down
  871.         END IF
  872.         IF piece = 10 THEN '4 dots block
  873.             _PUTIMAGE (665, 75 + yo)-(695, 105 + yo), litesquare& 'top left
  874.             _PUTIMAGE (695, 75 + yo)-(725, 105 + yo), litesquare& 'top right
  875.             _PUTIMAGE (665, 105 + yo)-(695, 135 + yo), litesquare& 'bottom left
  876.             _PUTIMAGE (695, 105 + yo)-(725, 135 + yo), litesquare& 'bottom right
  877.         END IF
  878.         IF piece = 11 THEN '4 dots horizonal
  879.             _PUTIMAGE (640, 85 + yo)-(670, 115 + yo), litesquare&
  880.             _PUTIMAGE (670, 85 + yo)-(700, 115 + yo), litesquare&
  881.             _PUTIMAGE (700, 85 + yo)-(730, 115 + yo), litesquare&
  882.             _PUTIMAGE (730, 85 + yo)-(760, 115 + yo), litesquare&
  883.         END IF
  884.         IF piece = 12 THEN '4 dots vertical
  885.             _PUTIMAGE (685, 40 + yo)-(715, 70 + yo), litesquare&
  886.             _PUTIMAGE (685, 70 + yo)-(715, 100 + yo), litesquare&
  887.             _PUTIMAGE (685, 100 + yo)-(715, 130 + yo), litesquare&
  888.             _PUTIMAGE (685, 130 + yo)-(715, 160 + yo), litesquare&
  889.         END IF
  890.         IF piece = 13 THEN '5 dots horizonal
  891.             _PUTIMAGE (625, 85 + yo)-(655, 115 + yo), litesquare&
  892.             _PUTIMAGE (655, 85 + yo)-(685, 115 + yo), litesquare&
  893.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare&
  894.             _PUTIMAGE (715, 85 + yo)-(745, 115 + yo), litesquare&
  895.             _PUTIMAGE (745, 85 + yo)-(775, 115 + yo), litesquare&
  896.         END IF
  897.         IF piece = 14 THEN '5 dots vertical
  898.             _PUTIMAGE (685, 20 + yo)-(715, 50 + yo), litesquare&
  899.             _PUTIMAGE (685, 50 + yo)-(715, 85 + yo), litesquare&
  900.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare&
  901.             _PUTIMAGE (685, 115 + yo)-(715, 145 + yo), litesquare&
  902.             _PUTIMAGE (685, 145 + yo)-(715, 175 + yo), litesquare&
  903.         END IF
  904.         IF piece = 15 THEN '5 dots left/up
  905.             _PUTIMAGE (655, 55 + yo)-(685, 85 + yo), litesquare&
  906.             _PUTIMAGE (685, 55 + yo)-(715, 85 + yo), litesquare&
  907.             _PUTIMAGE (715, 55 + yo)-(745, 85 + yo), litesquare&
  908.             _PUTIMAGE (715, 85 + yo)-(745, 115 + yo), litesquare&
  909.             _PUTIMAGE (715, 115 + yo)-(745, 145 + yo), litesquare&
  910.         END IF
  911.         IF piece = 16 THEN '5 dots right/up
  912.             _PUTIMAGE (655, 55 + yo)-(685, 85 + yo), litesquare&
  913.             _PUTIMAGE (685, 55 + yo)-(715, 85 + yo), litesquare&
  914.             _PUTIMAGE (715, 55 + yo)-(745, 85 + yo), litesquare&
  915.             _PUTIMAGE (655, 85 + yo)-(685, 115 + yo), litesquare&
  916.             _PUTIMAGE (655, 115 + yo)-(685, 145 + yo), litesquare&
  917.         END IF
  918.         IF piece = 17 THEN '5 dots right/down
  919.             _PUTIMAGE (655, 55 + yo)-(685, 85 + yo), litesquare&
  920.             _PUTIMAGE (685, 115 + yo)-(715, 145 + yo), litesquare&
  921.             _PUTIMAGE (715, 115 + yo)-(745, 145 + yo), litesquare&
  922.             _PUTIMAGE (655, 85 + yo)-(685, 115 + yo), litesquare&
  923.             _PUTIMAGE (655, 115 + yo)-(685, 145 + yo), litesquare&
  924.         END IF
  925.         IF piece = 18 THEN '5 dots left/down
  926.             _PUTIMAGE (715, 55 + yo)-(745, 85 + yo), litesquare&
  927.             _PUTIMAGE (715, 85 + yo)-(745, 115 + yo), litesquare&
  928.             _PUTIMAGE (685, 115 + yo)-(715, 145 + yo), litesquare&
  929.             _PUTIMAGE (715, 115 + yo)-(745, 145 + yo), litesquare&
  930.             _PUTIMAGE (655, 115 + yo)-(685, 145 + yo), litesquare&
  931.         END IF
  932.         IF piece = 19 THEN '9 dots big block
  933.             _PUTIMAGE (655, 55 + yo)-(685, 85 + yo), litesquare&
  934.             _PUTIMAGE (685, 55 + yo)-(715, 85 + yo), litesquare&
  935.             _PUTIMAGE (655, 85 + yo)-(685, 115 + yo), litesquare&
  936.             _PUTIMAGE (685, 85 + yo)-(715, 115 + yo), litesquare&
  937.             _PUTIMAGE (715, 55 + yo)-(745, 85 + yo), litesquare&
  938.             _PUTIMAGE (715, 85 + yo)-(745, 115 + yo), litesquare&
  939.             _PUTIMAGE (685, 115 + yo)-(715, 145 + yo), litesquare&
  940.             _PUTIMAGE (715, 115 + yo)-(745, 145 + yo), litesquare&
  941.             _PUTIMAGE (655, 115 + yo)-(685, 145 + yo), litesquare&
  942.         END IF
  943.  
  944.         'Assign the generated pieces values
  945.         IF pens = 1 THEN piece1 = piece
  946.         IF pens = 2 THEN piece2 = piece
  947.         IF pens = 3 THEN piece3 = piece
  948.  
  949.     NEXT
  950.  
  951.     _DISPLAY
  952.  
  953.  
  954.  
  955. SUB DrawPiece (piece, x, y)
  956.  
  957.     x = x - 30: y = y - 30 'center the mouse on a block
  958.  
  959.  
  960.     IF piece = 1 THEN '1 dot
  961.         _PUTIMAGE (x, y), litesquare&
  962.     END IF
  963.  
  964.     IF piece = 2 THEN '2 dots horizonal
  965.         _PUTIMAGE (x, y), litesquare&
  966.         _PUTIMAGE (x + 60, y), litesquare&
  967.     END IF
  968.  
  969.     IF piece = 3 THEN '2 dot vertical
  970.         _PUTIMAGE (x, y), litesquare&
  971.         _PUTIMAGE (x, y + 60), litesquare&
  972.     END IF
  973.  
  974.     IF piece = 4 THEN '3 dots left/up
  975.         _PUTIMAGE (x, y), litesquare&
  976.         _PUTIMAGE (x + 60, y), litesquare&
  977.         _PUTIMAGE (x + 60, y - 60), litesquare&
  978.     END IF
  979.  
  980.     IF piece = 5 THEN '3 dots right/up
  981.         _PUTIMAGE (x, y), litesquare&
  982.         _PUTIMAGE (x, y + 60), litesquare&
  983.         _PUTIMAGE (x + 60, y + 60), litesquare&
  984.     END IF
  985.  
  986.     IF piece = 6 THEN '3 dots left/down
  987.         _PUTIMAGE (x, y), litesquare&
  988.         _PUTIMAGE (x + 60, y), litesquare&
  989.         _PUTIMAGE (x + 60, y + 60), litesquare&
  990.     END IF
  991.  
  992.     IF piece = 7 THEN '3 dots right/down
  993.         _PUTIMAGE (x, y), litesquare&
  994.         _PUTIMAGE (x + 60, y), litesquare&
  995.         _PUTIMAGE (x, y + 60), litesquare&
  996.     END IF
  997.  
  998.     IF piece = 8 THEN '3 dots horizonal
  999.         _PUTIMAGE (x, y), litesquare&
  1000.         _PUTIMAGE (x + 60, y), litesquare&
  1001.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1002.     END IF
  1003.  
  1004.     IF piece = 9 THEN '3 dots vert
  1005.         _PUTIMAGE (x, y), litesquare&
  1006.         _PUTIMAGE (x, y + 60), litesquare&
  1007.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1008.     END IF
  1009.  
  1010.     IF piece = 10 THEN '4 dots block
  1011.         _PUTIMAGE (x, y), litesquare&
  1012.         _PUTIMAGE (x + 60, y), litesquare&
  1013.         _PUTIMAGE (x, y + 60), litesquare&
  1014.         _PUTIMAGE (x + 60, y + 60), litesquare&
  1015.     END IF
  1016.  
  1017.     IF piece = 11 THEN '4 dots horz
  1018.         _PUTIMAGE (x, y), litesquare&
  1019.         _PUTIMAGE (x + 60, y), litesquare&
  1020.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1021.         _PUTIMAGE (x + 60 + 60 + 60, y), litesquare&
  1022.     END IF
  1023.  
  1024.     IF piece = 12 THEN '4 dots vert
  1025.         _PUTIMAGE (x, y), litesquare&
  1026.         _PUTIMAGE (x, y + 60), litesquare&
  1027.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1028.         _PUTIMAGE (x, y + 60 + 60 + 60), litesquare&
  1029.     END IF
  1030.  
  1031.     IF piece = 13 THEN '5 dots horz
  1032.         _PUTIMAGE (x, y), litesquare&
  1033.         _PUTIMAGE (x + 60, y), litesquare&
  1034.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1035.         _PUTIMAGE (x + 60 + 60 + 60, y), litesquare&
  1036.         _PUTIMAGE (x + 60 + 60 + 60 + 60, y), litesquare&
  1037.     END IF
  1038.  
  1039.     IF piece = 14 THEN '5 dots vert
  1040.         _PUTIMAGE (x, y), litesquare&
  1041.         _PUTIMAGE (x, y + 60), litesquare&
  1042.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1043.         _PUTIMAGE (x, y + 60 + 60 + 60), litesquare&
  1044.         _PUTIMAGE (x, y + 60 + 60 + 60 + 60), litesquare&
  1045.     END IF
  1046.  
  1047.     IF piece = 15 THEN '5 dots left/up
  1048.         _PUTIMAGE (x, y), litesquare&
  1049.         _PUTIMAGE (x + 60, y), litesquare&
  1050.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1051.         _PUTIMAGE (x + 60 + 60, y + 60), litesquare&
  1052.         _PUTIMAGE (x + 60 + 60, y + 60 + 60), litesquare&
  1053.     END IF
  1054.  
  1055.     IF piece = 16 THEN '5 dots right/up
  1056.         _PUTIMAGE (x, y), litesquare&
  1057.         _PUTIMAGE (x + 60, y), litesquare&
  1058.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1059.         _PUTIMAGE (x, y + 60), litesquare&
  1060.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1061.     END IF
  1062.  
  1063.     IF piece = 17 THEN '5 dots right/down
  1064.         _PUTIMAGE (x, y), litesquare&
  1065.         _PUTIMAGE (x, y + 60), litesquare&
  1066.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1067.         _PUTIMAGE (x + 60, y + 60 + 60), litesquare&
  1068.         _PUTIMAGE (x + 60 + 60, y + 60 + 60), litesquare&
  1069.     END IF
  1070.  
  1071.     IF piece = 18 THEN '5 dots left/down
  1072.         _PUTIMAGE (x, y), litesquare&
  1073.         _PUTIMAGE (x + 60, y), litesquare&
  1074.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1075.         _PUTIMAGE (x + 60 + 60, y - 60), litesquare&
  1076.         _PUTIMAGE (x + 60 + 60, y - 60 - 60), litesquare&
  1077.     END IF
  1078.  
  1079.     IF piece = 19 THEN '9 dots big block
  1080.         _PUTIMAGE (x, y), litesquare&
  1081.         _PUTIMAGE (x + 60, y), litesquare&
  1082.         _PUTIMAGE (x + 60 + 60, y), litesquare&
  1083.         _PUTIMAGE (x, y + 60), litesquare&
  1084.         _PUTIMAGE (x + 60, y + 60), litesquare&
  1085.         _PUTIMAGE (x + 60 + 60, y + 60), litesquare&
  1086.         _PUTIMAGE (x, y + 60 + 60), litesquare&
  1087.         _PUTIMAGE (x + 60, y + 60 + 60), litesquare&
  1088.         _PUTIMAGE (x + 60 + 60, y + 60 + 60), litesquare&
  1089.     END IF
  1090.  
  1091.     _DISPLAY
  1092.  
  1093.  
  1094. '======================================================================
  1095.  
  1096. FUNCTION BASIMAGE1& 'darksquare.bmp
  1097.     v& = _NEWIMAGE(55, 55, 32)
  1098.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  1099.     A$ = ""
  1100.     A$ = A$ + "haIkJ^nDCL567NcEP4B2QT#4#;PSfFVNafZRRf?PG11B3B4bU=g31BT08PD]"
  1101.     A$ = A$ + "06d>MJWj<Mj<MJ]E7_Dak=VJaQa;m3mO]OmM?KB8:SCo#BWMjIj7NVChLf\k"
  1102.     A$ = A$ + "k3WcimLf\KXUN2R\lSAREbSdG:?ROnEah;n8TNYe#j5G7aGh?#jUON9Vh258"
  1103.     A$ = A$ + "k;HTLUGP4IO>R_lcH4KYeIUBeE>5Ko=Ai7[di\L6oR_TAaS;5mi9cn<LjUGW"
  1104.     A$ = A$ + ":G7Yb^6VnKO92_D>4NUL`kR?4AoZeQocU7RW;7R]hC#oAnAHIknPP^NPNkS2"
  1105.     A$ = A$ + "]f201;S0]>21e5#X927APPcXK0[^PbHGD^\Y#_:5Ko=Aack[O^9D]UH<4\7V"
  1106.     A$ = A$ + "e^6WaPN7AQ>K1YbP#S3oH77h;PWYN0igC9oN:2Tm9TKi`4Gj?aQ7mW8?l01Q"
  1107.     A$ = A$ + "N9j326l0mF31]F20=FR0EVY[SihdaTP8i6d`h#`jHK#S9IXff4<dH?5SRo]4"
  1108.     A$ = A$ + "5?V=mm\>13e=VjE#S]d\bR]YEZNc9Q:CaQJFl41jMBW3KR`CVe#HJlEPUYn["
  1109.     A$ = A$ + ";^>>Zh?COO_D\WnofHT6WI?66;kO1o;n08NnO3FfAHXgV?U?fZ6^IHDdiQ^4"
  1110.     A$ = A$ + "=Nl^Hh<g4Zgb`DK3[laFUB]DoS1JlgFl3_;\:j=6=?[Q1YjM[laFe`=CDnQF"
  1111.     A$ = A$ + "5Ad;TGf=;3`7^EWoB^5TF7khDNO1clWK1FhNb^IZO^b=M]82_c]:j;lEXl;m"
  1112.     A$ = A$ + "3Eeb9iB<j3jK>`6^Eg9h:gZeY8l?kM;iVVJh0gZiEM[O9gZ]?n`=mNI[_Ed]"
  1113.     A$ = A$ + "12OEZ>JoS23ZlaFEb=S]6QifPA^6ohV^AXaPSFb=GaTjgTfko0:O\mo^m?jV"
  1114.     A$ = A$ + "YFRP0Wi>`ElOQb_L<8Xj4:O\EY8=O[>:GBC1PoIFUKMcgDgN3gd`9^I`gVkg"
  1115.     A$ = A$ + "h<g4WNEh>1U;Y^S31]m[laFU2U;A=iV5:GB`I^S\K6jUkL;4]6`#SM=Igdc7"
  1116.     A$ = A$ + "[1XeH0VKAVkNTKGWLSjcdiBiS]Z\K^CN38D?eWYU3fcUVCabUDOcQIS9I^Ib"
  1117.     A$ = A$ + "5giVXdl]a_9gjVka8g<?4E?7<OkeLkcB#S9KHH^c=YiK34oj#UE?LYK3VhF#"
  1118.     A$ = A$ + "XaAYjiPO3?YkaY\aTmcLc;giVdm_eGRO52fl1=V4EnH[JhFIgofa;hV:Nb=W"
  1119.     A$ = A$ + "nQ_Y_5>fHgQm<Ii2g:N_Y5Lk8a_]lcK^n0:O\EUkg>D<J]K7R\O?F5?fZ2^9"
  1120.     A$ = A$ + "M?>egB#4IQkSNRN3na=Jm=9g<C^5[XK>iTaT_VK7^PKLaJ05L[hHbS#cgdj<"
  1121.     A$ = A$ + "4dJ>Xb7KE1g4<jMC^YcB8U?fZDdjIC^Y^YP#O3QEnHkO1gDAi9[aJ4U?fZR^"
  1122.     A$ = A$ + "9U;aeTg72f303>RZlaFUR^C1]ek3FJ=4c=gB^ISLe>OiFTi^[\Kdm_a;^YRL"
  1123.     A$ = A$ + "c4iF`cLK^d=SK=4kih<ld?2>NW9QN;nEnH[RMc3de##df^V79F:?lNf7SMnY"
  1124.     A$ = A$ + "W7eb3_SQeLBXcQOd][;SX;U31cV7m4jkAkOdT:O\EQXYYQ#7kkdHX<G39nbl"
  1125.     A$ = A$ + "8hGW7WL^KQNlMI\egK<H[IO`PIG\gIIQJ>Zlk`PNG\oWXbX7J\k`#_IgdnKX"
  1126.     A$ = A$ + "fdf;4Ze5DIN4X]AAXa6]n_ER6XmhHQf3WEYgaihde<1U;>>=_>f6H=Q<BeG6"
  1127.     A$ = A$ + "Z]WPQla#i0J<L12E2EdeA=EZfV8M\nXmN<2<nFna>j>3LWj:dl\[RdOgcAP;"
  1128.     A$ = A$ + "W3AoVO7nFhNX_Po0jnH[PgnSCQ>gcHXcmW4k\[CSfgC6dfWT1KOgCQg][Y#W"
  1129.     A$ = A$ + "MU2MlQAAk_O<df7T0KKGCPM^oiXcmlXSmOFdFgc9c1V5]M`ITAjc5H[kKJd:"
  1130.     A$ = A$ + "MNJI_I:A77l\UXm3<?JM_cPVgMVBdJI\=Z]fgk\HkM=_<kKFde9n:fc]9ib["
  1131.     A$ = A$ + "1oOn3APEbQo6YgZn%%%0"
  1132.     btemp$ = ""
  1133.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  1134.         IF INSTR(1, B$, "%") THEN
  1135.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  1136.                 IF F$ <> "%" THEN C$ = C$ + F$
  1137.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  1138.             IF MID$(B$, j, 1) = "#" THEN
  1139.         MID$(B$, j) = "@": END IF: NEXT
  1140.         FOR t% = LEN(B$) TO 1 STEP -1
  1141.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  1142.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  1143.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  1144.     NEXT: btemp$ = btemp$ + X$: NEXT
  1145.     btemp$ = _INFLATE$(btemp$)
  1146.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  1147.     BASIMAGE1& = _COPYIMAGE(v&): _FREEIMAGE v&
  1148.  
  1149. FUNCTION BASIMAGE2& 'litesquare.bmp
  1150.     v& = _NEWIMAGE(55, 55, 32)
  1151.     DIM m AS _MEM: m = _MEMIMAGE(v&)
  1152.     A$ = ""
  1153.     A$ = A$ + "haIgIVnEKML67noQn]FgL\M>==e]=YYafhe#0<K6_`Z4B2]_;3J1QHCB816`"
  1154.     A$ = A$ + "\H0361X5f4K2#Ff6K2>>>>hhm]dDkSKJBj99f>MkoROmm>b83=]O2M>j8mQW"
  1155.     A$ = A$ + "c<cM^gilnLWi>cL_G9>^0TilL#Uk8`#;APb6V2J]_0<hH9H`nb#I]G46LNUH"
  1156.     A$ = A$ + "X[YGQ[?VQ6gO<Dij:#YcEHX`ab\D^S]NF[noO\ncU[=G?JKnZ<FkldCi[de:"
  1157.     A$ = A$ + "h4>GVBG6jM]4<eeEQD7QQDgQAifW7bKSRSfG2bK94L=je#XklL4Le_5cL[WS"
  1158.     A$ = A$ + "8Oao6cL_O0cLo_7cA<kmn>6QN`?P5NhcIi?oCoGKPiOd?b^VIO`Jl2<mMoN4"
  1159.     A$ = A$ + "jQ_<ja_o;AXko?X[m_oCPkhQN`?RiOl;#X7mL6_^MN=QN5ANl;aLgi_Q;lWn"
  1160.     A$ = A$ + "Wden24hjO3L5l6#IWQQXfF4UebR#T[PX1o[P1^d3ahOfCYdKQ`O1M^[n<VCS"
  1161.     A$ = A$ + "Le_TLmKH<aWm<<iZO52nioE6cNk_Uen[Qo?i?c>NXknMHZKneaBi>FP[m4Fn"
  1162.     A$ = A$ + "ecJ]K<^mGcHZKnE<2nioUH`E>`enB6Li7kj?1SmY?=:GkIHhEN2jilg7=>:="
  1163.     A$ = A$ + ">XeYPRf>7ZJPU`YVoFXS5^>lM]7Rf3]26iCN4>cbg33]bSAWQ^>l\dma#Gj1"
  1164.     A$ = A$ + "X_`gTU>bUO8joLg2NGnAKPNFHE<h5_;lAG7ge\FjP;M7dKhEQW;Ok=`#;OgO"
  1165.     A$ = A$ + ":GnN`cU^;[n1GjFaPkHL]1[MXlmOaK7U;L76M5j6XciF5^6OIDCoQQ^FG4Ek"
  1166.     A$ = A$ + "iS`YVk6`^oc3oOjS#;1oXTJLhoR`BO;09=>9DgfL`VW;0;m?3JMfUChafV5c"
  1167.     A$ = A$ + "m=;=Wb`#k9G0iYH8XjTC05=?2L=aB9lHKcRYC742Kh<#NCAH^9]9o#RccVBh"
  1168.     A$ = A$ + "Vnf3Pb[[78VF7;GINXn#_#DSmWBhV2GNPPjk3RZMFVKEd``TKW5e>d29lH;N"
  1169.     A$ = A$ + "hVdV64UKM:T_dQA5e?<e7>8=Wbl9lH;NhV<RGkf8#R3?YD^9\jIBYM[PGiVD"
  1170.     A$ = A$ + "kN#MNF<Q7KKFdeVO`WVWTc]S8e74GWG8cn#XQQ>G2?ff\HhDSQb\e=c]S:c?"
  1171.     A$ = A$ + "TFW?VK>lNQ4N\5?LSg[LkH:8_Zg?TkPfGBP;U`S]=;WXSa1oJ?m[M[1o#UC_"
  1172.     A$ = A$ + "`]oTOgZZc9P#ji=AFV67CYGXXQ0#MCnPKOG<Q7KKF<fmT#4]_4QVWRiVBb=="
  1173.     A$ = A$ + "^lC^Ul_W;^m:;VfoX0S1I^YZaAQFg1#;1^L2?fR7^9an0ajghLC7iV[ABnWW"
  1174.     A$ = A$ + "dHGCB[E?0Z`dDX#EnPJb=mTK>mTl_nFUdL9bXgGC\iYI^Y95c=idk18QF3X8"
  1175.     A$ = A$ + "enIS9CULCQ[QP<[cB^=:KNBMdlT]T2\60gJg:M?<c]2e<F<gJKdTo_54WKZJ"
  1176.     A$ = A$ + "N4fHbekFkSUhS]hQKZKa;ZPki=]S7c]>VHU4N\5?M[#eSWBe_I^WYI?_aifa"
  1177.     A$ = A$ + "Ea=Vd?c]FC1fGBM3^#\e0>RBJNb6m3]^lQCV2l>>[g]SZJ2VKJLk5=78iO=P"
  1178.     A$ = A$ + "eLSK<I1[c=gnCng?iJ^amnKi[JBXd>=V\IO`U_cW`S]=;ek9<kKMamN0iB^Y"
  1179.     A$ = A$ + "`1]WbVmRVl59Q7Ka;g4HJ2TSjYI^a]VPCo9okWLm^M8U1I^Y]Eo`Y_`9lH;N"
  1180.     A$ = A$ + "jFV:6WiVAJoc=U2iV\JW3I8O<X:5d=5YP^EgP;6c]\Fc]>8glVlkF]WMnX_o"
  1181.     A$ = A$ + "6ifQXWghLc<iVkD0gZ^_IoOjFR>^R7`m=lHOCQD#ghnG7LOkeeLCC:TKJKe7"
  1182.     A$ = A$ + "4DK?\iB>FUcA^50ediD9lh:NPJJOaUJ^CVK5B^9ajP`#CST`S[h1jJMD`[jC"
  1183.     A$ = A$ + "3IFWQiFIjk2EHYk4NL5?#YcQ8WJ3R]4TiF1bJ65Ya=<fBbOOGiDODfbKTmOL"
  1184.     A$ = A$ + ":ad2hmbC?nPR=1QEe6TJ]CXYYQ#U]?>=fM4HUF_`LGCRj7H1XVFgP;OMdaZV"
  1185.     A$ = A$ + "B]NjXHSXV^67FkL<DM7S63Km>5Z\S04nYf98<gm4`lY73VjNd=Pa^la`jI67"
  1186.     A$ = A$ + "Efi8dj_C#cUkU:?:Z\[QQ]1h:kSEfL_nA]m?>\ecHXa1227m?=<MB_POU]2Q"
  1187.     A$ = A$ + "TGY;`:>0oZYinSPb]M>L#N=POGVB#>2\PS:[NFO8OSMPlTE7:Wl]4m=C_7KW"
  1188.     A$ = A$ + "8O9eBSOM1Q6KUUbcPK`k4^#i4l=h4ldi0UYe>AS<4Hd=:DK3X#Me3nVX[cB;"
  1189.     A$ = A$ + "<4Hae6P_57Aa\3DXNK#PEWX4SeaP;OQ6ZQZg>[L5ej25CU5Ia9Z`Jc#V]fIa"
  1190.     A$ = A$ + "#jl>1BW_AL#1ESg<MA#^S`#\[8XDC3Pd>>EGIEQd;f0fcAeRd;e8fCnbANl<"
  1191.     A$ = A$ + "Q\:F?:#X5\glTP\;A;><o:IYiDZ>TCIJITMYJ#>UX4IG\2TE9bHT_0=h3;F:"
  1192.     A$ = A$ + "SLYlIFV<6IDZT=#jU8VA^RDQ?\Da8OaJ#FlUa8OaZA6UaEWbHi?R<mDM:#^E"
  1193.     A$ = A$ + "X37CQ5:e4fiQUQg>C1hgV[<\?Qe0EW<24OZ8djMc3nFk5_C>B`kU[D\Kb]39"
  1194.     A$ = A$ + "b6NoLTR\:Ul]#=8gb=QMWM58SRDS\;C?;=cRe4UBDAUEBWW2l15:=67RWJL`"
  1195.     A$ = A$ + "S;1kW8C:OFU7U<i[J3T1?5<hbOPRXa?2Yk]dmVokbLWcQh^OEVLFk\c24P3F"
  1196.     A$ = A$ + "R2\gRDQg>3NhWm^iQME\ADZ]1PQN_24eMH8_ScC[g=;MOi\HOih6ojoXN\SM"
  1197.     A$ = A$ + "Y6kH_J`KUf9`ffEEH[_OEh=gYAlKBc8fAJjafOGiHKoN5H[_S:l6o1Mh]f[E"
  1198.     A$ = A$ + "l[fG=Hkke6fjn\6UmG=fj1<75^l_ROiN<Q]#]c_HgE5S]O0KaHKk_6\UMK6o"
  1199.     A$ = A$ + "lMFE<fbjh=Xjff^YaNYECDfCe8]3g6kofXaiB#HMc3A^3So3_L>L%%%0"
  1200.     btemp$ = ""
  1201.     FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
  1202.         IF INSTR(1, B$, "%") THEN
  1203.             FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
  1204.                 IF F$ <> "%" THEN C$ = C$ + F$
  1205.             NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
  1206.             IF MID$(B$, j, 1) = "#" THEN
  1207.         MID$(B$, j) = "@": END IF: NEXT
  1208.         FOR t% = LEN(B$) TO 1 STEP -1
  1209.             B& = B& * 64 + ASC(MID$(B$, t%)) - 48
  1210.             NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
  1211.             X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
  1212.     NEXT: btemp$ = btemp$ + X$: NEXT
  1213.     btemp$ = _INFLATE$(btemp$)
  1214.     _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
  1215.     BASIMAGE2& = _COPYIMAGE(v&): _FREEIMAGE v&
  1216.  
  1217. SUB ShowScore
  1218.     LINE (2, 2)-(_WIDTH - 2, 48), _RGB(64, 0, 0), BF
  1219.     PPRINT 313, 13, 20, _RGB(255, 255, 255), _RGB(64, 0, 0), ".::10x10::."
  1220.     PPRINT 625, 13, 20, _RGB(172, 114, 88), _RGB(64, 0, 0), "Hi:" + STR$(hiscore)
  1221.     PPRINT 35, 13, 20, _RGB(172, 114, 88), _RGB(64, 0, 0), "Score:" + STR$(score)
  1222.     _DISPLAY
  1223.  
  1224. SUB PPRINT (x, y, size, clr&, trans&, text$)
  1225.     orig& = _DEST
  1226.     bit = 32: IF _PIXELSIZE(0) = 1 THEN bit = 256
  1227.     FOR t = 0 TO LEN(text$) - 1
  1228.         pprintimg& = _NEWIMAGE(16, 16, bit)
  1229.         _DEST pprintimg&
  1230.         CLS , trans&: COLOR clr&
  1231.         PRINT MID$(text$, t + 1, 1);
  1232.         _CLEARCOLOR _RGB(0, 0, 0), pprintimg&
  1233.         _DEST orig&
  1234.         x1 = x + (t * size): x2 = x1 + size
  1235.         y1 = y: y2 = y + size
  1236.         _PUTIMAGE (x1 - (size / 2), y1)-(x2, y2 + (size / 3)), pprintimg&
  1237.         _FREEIMAGE pprintimg&
  1238.     NEXT
  1239.  
  1240.  

 
10x10v14.jpg
« Last Edit: January 06, 2021, 02:15:57 pm by Dav »

FellippeHeitor

  • Guest
Re: 10x10 Puzzle Game (Woody clone)
« Reply #35 on: January 05, 2021, 08:54:25 pm »
Quote
Btw, does anyone know if cyberbit.ttf will be included in the official QB64 v1.5 release?  It wasn't in the dev build.

It won't.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #36 on: January 06, 2021, 01:36:46 pm »
Ok. Thanks.

I removed the need for the external font file, and used the Pprint SUB I posted a while ago.  I think this is the last of this program for a while.  Getting burned out on it...

- Dav