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

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
10x10 Puzzle Game (Woody clone)
« on: January 03, 2021, 12:47:50 pm »
This is a line puzzle game like the Woody puzzle.  I worked it out in my mind while driving to the mountains yesterday, and when I got home last night the source code flowed out pretty well.  Drag the blocks onto the board to form lines and rows.  Completed lines will erase.  You get higher scores for completing several lines at one time.  See how high a score you can get until you get stuck and there's no more room to place a block (which can happen pretty quickly).

- Dav

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

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #1 on: January 03, 2021, 01:06:23 pm »
Just whipped up a 1000+ LOC last night :-))

Isn't this like Tetris?

Yeah without the time pressure, I bet.
« Last Edit: January 03, 2021, 01:10:11 pm by bplus »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #2 on: January 03, 2021, 01:22:06 pm »
It is like tetris in a way, in that you have a certain number of shaped blocks to form line, but they dont drop down and you cant rotate them, you just have to place them together as you want. I find it more relaxing tah tetris.

- Dav

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #3 on: January 03, 2021, 01:28:17 pm »
Just whipped up a 1000+ LOC last night :-))

Yep, But I did have to stay up till after 2am.

Also, a lot of the code, like the playing board system and placement method is the same as in some other of my puzzle games, so I did kind of plug-n-play some code, made it go it quicker than usual.

- Dav
« Last Edit: January 03, 2021, 02:03:32 pm by Dav »

FellippeHeitor

  • Guest
Re: 10x10 Puzzle Game (Woody clone)
« Reply #4 on: January 03, 2021, 01:45:45 pm »
Pretty cool to play, Dav!

I did get this issue where the bottom line would never clear:

 
Captura de Tela 2021-01-03 às 15.42.15.png

 
Captura de Tela 2021-01-03 às 15.44.27.png

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #5 on: January 03, 2021, 01:55:03 pm »
Pretty cool to play, Dav!

I did get this issue where the bottom line would never clear:

Ah...I see what I did wrong there. OK...I fixed the original code.  Should work correctly now, hope.  It was a too short FOR/NEXT bug in the UpdateBoard SUB.

Thanks for trying it, @FellippeHeitor!

- Dav

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #6 on: January 03, 2021, 03:04:21 pm »
I was doing well until... I wasn't... Nice game!

 
ss.png
You're not done when it works, you're done when it's right.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #7 on: January 03, 2021, 03:14:26 pm »
Very nice game, Dav :)

 
score.JPG
« Last Edit: January 03, 2021, 03:38:53 pm by Petr »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #8 on: January 03, 2021, 04:16:39 pm »
Now that one is fun. I only got to 200 on the first try. It's a head scratcher.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #9 on: January 03, 2021, 05:30:20 pm »
Thanks, everyone.   

I see there needs to be an improvement on how it examines the completed lines.  As it is now, if you drop a piece that completes both a horizontal and vertical line, it will clear the horizontal lines first (rows). Then and after those are cleared, the vertical lines will no longer be complete, so those lines will end up not being cleared.  I need to fix it so that all completed lines will be marked first, then do the clearing, so that none are missed.

I also think I will replace the color scheme to a more original one, maybe some SFX.

- Dav

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #10 on: January 03, 2021, 06:02:44 pm »
Hi Day
nice game, I suggest that instead of terminating the program when there are no more moves that it will restart a new game, one can exit the game by clicking on the X

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #11 on: January 03, 2021, 06:48:28 pm »
@jack: Sounds good. Ill do that. Thanks.

- Dav

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #12 on: January 03, 2021, 07:14:42 pm »
:)
score.png
* score.png (Filesize: 60.33 KB, Dimensions: 1536x864, Views: 215)

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #13 on: January 03, 2021, 08:24:02 pm »
I didn't want to admit what broke my concentration when playing my last game, but I completely blame @SpriggsySpriggs because in Discord he said the Matrix has plot holes!... right when I had to deal with a 3x3 woody block. Needless to say I spilled my Froot Loops all over the place and started yelling at him through my screen.
You're not done when it works, you're done when it's right.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: 10x10 Puzzle Game (Woody clone)
« Reply #14 on: January 03, 2021, 09:58:21 pm »
I have updated the original code to fix the row+column combo clearing problem.  They all should clear correctly now.  I also added game restart as suggested, and you can also press SPACE to quit the current game and start over.  Thanks all for testing it for me!

Lol @STxAxTIC .  Yeah, those big blocks get me often too.

- Dav