'=========
'10x10.bas - v1.5
'=========
'A 10x10 lines puzzle (Woody clone)
'Coded by Dav, JAN/2021
'Follow this programs development here:
'https://www.qb64.org/forum/index.php?topic=3444.0
'v1.5 changes: fixed: Removed external font call. Uses PPRINT.
'=====
'ABOUT:
'=====
'Clone of the Woody puzzle. Drag pices onto the board
'to make completed rows or columns. Completed lines erase.
'Bonus points are given for clearing more than one line at
'the same time. See how high a score you can get until you
'run out of space to make a move.
'
'Hit SPACE to quit and restart game.
ShowScore
DIM SHARED rows
, cols
, size
, piece1
, piece2
, piece3
, score
, hiscore
rows = 10: cols = 10: size = 60
DIM SHARED box.x1
(rows
* cols
), box.x2
(rows
* cols
) DIM SHARED box.y1
(rows
* cols
), box.y2
(rows
* cols
)
darksquare& = BASIMAGE1&
litesquare& = BASIMAGE2&
'============
Restart:
'============
score = 0
'Init the box values
bc = 1 'counter
x = (r * size): y = 50 + (c * size)
box.x1(bc) = x - size: box.x2(bc) = x
box.y1(bc) = y - size: box.y2(bc) = y
box(bc) = 0 'set value to 0...means empty box
bc = bc + 1
DrawHoldingPens
UpdateBoard
'if clicked holding pen 1
'grab background in case restore needed
'clear holding pen 1
'pickup piece, drag it around until mouse up
'show piece in hand, over backgraound
'_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
'If user unclicked the button (let go)
'see if unclicked over an empty box
IF mx2
>= box.x1
(r
) AND mx2
<= box.x2
(r
) AND my2
>= box.y1
(r
) AND my2
<= box.y2
(r
) THEN
'If the piece fits...
IF Validate
(piece1
, r
, 0) = 1 THEN AddToScore piece1
piece1 = 0 'remove piece from pen
curpiece = piece1
curpiece = piece1
'please release me, let me go....
'if clicked holding pen 2
'grab background in case restore needed
'clear holding pen 2
'pickup piece, drag it around until mouse up
'show piece in hand, over backgraound
'_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
'If user unclicked the button (let go)
'see if unclicked over an empty box
IF mx2
>= box.x1
(r
) AND mx2
<= box.x2
(r
) AND my2
>= box.y1
(r
) AND my2
<= box.y2
(r
) THEN
'If the piece fits...
IF Validate
(piece2
, r
, 0) = 1 THEN AddToScore piece2
piece2 = 0 'remove piece from pen
curpiece = piece2
curpiece = piece2
'please release me, let me go....
'if clicked holding pen 3
'grab background in case restore needed
'clear holding pen 3
'pickup piece, drag it around until mouse up
'show piece in hand, over backgraound
'_PUTIMAGE (_MOUSEX, _MOUSEY), litesquare&: _DISPLAY
'If user unclicked the button (let go)
'see if unclicked over an empty box
IF mx2
>= box.x1
(r
) AND mx2
<= box.x2
(r
) AND my2
>= box.y1
(r
) AND my2
<= box.y2
(r
) THEN
'If the piece fits...
IF Validate
(piece3
, r
, 0) = 1 THEN AddToScore piece3
piece3 = 0 'remove piece from pen
curpiece = piece3
curpiece = piece3
'please release me, let me go....
doneamove:
'Get new pieces if all holding pens empty
IF piece1
= 0 AND piece2
= 0 AND piece3
= 0 THEN DrawHoldingPens
UpdateBoard
LINE (200, 175)-(525, 325), _RGBA(0, 0, 0, 150), BF
LINE (200, 175)-(525, 325), _RGB(255, 255, 255), B
LINE (199, 174)-(526, 326), _RGB(255, 255, 255), B
PPRINT
240, 200, 20, _RGB(255, 255, 255), 0, "NO MOVES LEFT!" PPRINT
275, 240, 20, _RGB(255, 255, 255), 0, "Score:" + STR$(score
) PPRINT
230, 280, 20, _RGB(255, 255, 0), 0, "NEW HIGH SCORE!" 'wait until mouse click
'============================
'============
PieceReturn:
'animate sending piece back to original x/y
cx = mx2: cy = my2
xdone = 0: ydone = 0
cx = cx - 12
cx = mx: xdone = 1
cx = cx + 12
cx = mx: xdone = 1
cy = cy - 12
cy = my: ydone = 1
cy = cy + 12
cy = my: ydone = 1
DrawPiece curpiece, cx - 20, cy - 20
'Checks if moves are left
MovesLeft = 0 'default none left until a move found
'if there's a piece in holding pen 1
'run piece check on all open boxes
'test piece on box if empty
IF Validate
(piece1
, r
, 1) = 1 THEN
'if there's a piece in holding pen 2
'run piece check on all open boxes
IF Validate
(piece2
, r
, 1) = 1 THEN
'if there's a piece in holding pen 3
'run piece check on all open boxes
IF Validate
(piece3
, r
, 1) = 1 THEN
bc = 1 'counter
_PUTIMAGE (box.x1
(bc
), box.y1
(bc
))-(box.x2
(bc
), box.y2
(bc
)), darksquare&
_PUTIMAGE (box.x1
(bc
), box.y1
(bc
))-(box.x2
(bc
), box.y2
(bc
)), litesquare&
bc = bc + 1
'Check for completed lines...add score
'10 points for clearing 1 row or col,
'bonus points for doing several at one time
tallyup = 0: bonus = 0
'scan for completed rows...
'RowClear rw
rowdo(rc) = rw: rc = rc + 1: rowhere = 1
tallyup = tallyup + 10
bonus = bonus + 1
'scan for completed columns...
coldo(cc) = c: cc = cc + 1: colhere = 1
tallyup = tallyup + 10
bonus = bonus + 1
'ColClear c
'Now do the erasing...
IF rowdo
(e
) <> 0 THEN RowClear rowdo
(e
) IF coldo
(e
) <> 0 THEN ColClear coldo
(e
)
score = score + (tallyup * bonus)
IF score
> hiscore
THEN hiscore
= score
ShowScore
_TITLE "10x10 - Your Score:" + STR$(score
) + " - High Score:" + STR$(hiscore
)
RowDone = 1
IF box
(r
) = 0 THEN RowDone
= 0
LINE (box.x1
(r
), box.y1
(r
))-(box.x2
(r
), box.y2
(r
)), _RGB(255, 255, 255), BF
_PUTIMAGE (box.x1
(r
), box.y1
(r
))-(box.x2
(r
), box.y2
(r
)), darksquare&
box(r) = 0
ColDone = 1
IF box
(c
) = 0 THEN ColDone
= 0
LINE (box.x1
(r
), box.y1
(r
))-(box.x2
(r
), box.y2
(r
)), _RGB(255, 255, 255), BF
_PUTIMAGE (box.x1
(r
), box.y1
(r
))-(box.x2
(r
), box.y2
(r
)), darksquare&
box(r) = 0
FUNCTION Validate
(piece
, num
, checkonly
)
'This function validates if pieces fit
'if checkonly flag is on, then it just checks to see
'if checkonly flag = 0 then it checks and marks box() filled
Validate = 0 'default not validated
'one dot piece
box(num) = 1
Validate = 1
'2 dot horizonal
'don't validate if on the last box on right side
'validate if this box and next box over is free
box(num) = 1: box(num + 1) = 1
Validate = 1
'2 dot vertical
'don't validate if on bottom row
'validate if this box and box below is free
box(num) = 1: box(num + 10) = 1
Validate = 1
IF piece
= 4 THEN '3 dots left/up 'dont validate if on top row
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
- 9) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num - 9) = 1
Validate = 1
IF piece
= 5 THEN '3 dots right/up 'don't validate bottom row
'don't validate if on the last box on right side
IF box
(num
) = 0 AND box
(num
+ 10) = 0 AND box
(num
+ 11) = 0 THEN box(num) = 1: box(num + 10) = 1: box(num + 11) = 1
Validate = 1
'don't validate bottom row
'don't validate if on the last box on right side
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
+ 11) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num + 11) = 1
Validate = 1
'don't validate bottom row
'don't validate if on the last box on right side
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
+ 10) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num + 10) = 1
Validate = 1
IF piece
= 8 THEN '3 dots horz 'don't validate if on the last 2 columns on right side
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
+ 2) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num + 2) = 1
Validate = 1
IF piece
= 9 THEN '3 dots vert 'don't validate bottom 2 row
IF box
(num
) = 0 AND box
(num
+ 10) = 0 AND box
(num
+ 20) = 0 THEN box(num) = 1: box(num + 10) = 1: box(num + 20) = 1
Validate = 1
IF piece
= 10 THEN '4 dots block 'don't validate bottom row
'don't validate if on the last box on right side
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
+ 10) = 0 AND box
(num
+ 11) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num + 10) = 1: box(num + 11) = 1
Validate = 1
IF piece
= 11 THEN '4 dots horz 'don't validate if on the last 3 columns on right side
IF box
(num
) = 0 AND box
(num
+ 1) = 0 AND box
(num
+ 2) = 0 AND box
(num
+ 3) = 0 THEN box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 3) = 1
Validate = 1
IF piece
= 12 THEN '4 dots vert 'don't validate bottom 3 rows
IF box
(num
) = 0 AND box
(num
+ 10) = 0 AND box
(num
+ 20) = 0 AND box
(num
+ 30) = 0 THEN box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 30) = 1
Validate = 1
IF piece
= 13 THEN '5 dots horz 'don't validate if on the last 3 columns on right side
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 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 3) = 1: box(num + 4) = 1
Validate = 1
IF piece
= 14 THEN '5 dots vert 'don't validate bottom 4 rows
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 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 30) = 1: box(num + 40) = 1
Validate = 1
IF piece
= 15 THEN '5 dots left/up 'don't validate bottom 2 rows
'don't validate if on the last 2 columns on right side
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 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 12) = 1: box(num + 22) = 1
Validate = 1
IF piece
= 16 THEN '5 dots right/up 'don't validate bottom 2 rows
'don't validate if on the last 2 columns on right side
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 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num + 10) = 1: box(num + 20) = 1
Validate = 1
IF piece
= 17 THEN '5 dots right/down 'don't validate bottom 2 rows
'don't validate if on the last 2 columns on right side
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 box(num) = 1: box(num + 10) = 1: box(num + 20) = 1: box(num + 21) = 1: box(num + 22) = 1
Validate = 1
IF piece
= 18 THEN '5 dots left/down 'don't validate top 2 rows
'don't validate if on the last 2 columns on right side
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 box(num) = 1: box(num + 1) = 1: box(num + 2) = 1: box(num - 8) = 1: box(num - 18) = 1
Validate = 1
IF piece
= 19 THEN '9 dots big block 'don't validate bottom 2 rows
'don't validate if on the last 2 columns on right side
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 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
Validate = 1
IF num
= 1 THEN score
= score
+ 1 IF num
= 2 THEN score
= score
+ 2 IF num
= 3 THEN score
= score
+ 2 IF num
= 4 THEN score
= score
+ 3 IF num
= 5 THEN score
= score
+ 3 IF num
= 6 THEN score
= score
+ 3 IF num
= 7 THEN score
= score
+ 3 IF num
= 8 THEN score
= score
+ 3 IF num
= 9 THEN score
= score
+ 3 IF num
= 10 THEN score
= score
+ 4 IF num
= 11 THEN score
= score
+ 4 IF num
= 12 THEN score
= score
+ 4 IF num
= 13 THEN score
= score
+ 5 IF num
= 14 THEN score
= score
+ 5 IF num
= 15 THEN score
= score
+ 5 IF num
= 16 THEN score
= score
+ 5 IF num
= 17 THEN score
= score
+ 5 IF num
= 18 THEN score
= score
+ 5 IF num
= 19 THEN score
= score
+ 9
'Draws 3 holding pens, smaller version of pieces,
'and assigns random piece to each holding pen...
'holding pen 1
LINE (610, 60)-(790, 240), _RGB(105, 14, 0), BF
'holding pen 2
LINE (610, 260)-(790, 440), _RGB(105, 14, 0), BF
'holding pen 3
LINE (610, 460)-(790, 640), _RGB(105, 14, 0), BF
'Get a random piece
'There are 19 total pieces to choose from
'y offset vaule for the pens
_PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
IF piece
= 2 THEN '2 dots horizonal _PUTIMAGE (670, 85 + yo
)-(700, 115 + yo
), litesquare&
'mid _PUTIMAGE (700, 85 + yo
)-(730, 115 + yo
), litesquare&
'right IF piece
= 3 THEN '2 dots vertical _PUTIMAGE (685, 100 + yo
)-(715, 130 + yo
), litesquare&
'mid _PUTIMAGE (685, 70 + yo
)-(715, 100 + yo
), litesquare&
'up IF piece
= 4 THEN '3 dots Left/Up _PUTIMAGE (700, 100 + yo
)-(730, 130 + yo
), litesquare&
'mid _PUTIMAGE (700, 70 + yo
)-(730, 100 + yo
), litesquare&
'up _PUTIMAGE (670, 100 + yo
)-(700, 130 + yo
), litesquare&
'left IF piece
= 5 THEN '3 dots right/Up _PUTIMAGE (670, 100 + yo
)-(700, 130 + yo
), litesquare&
'mid _PUTIMAGE (670, 70 + yo
)-(700, 100 + yo
), litesquare&
'up _PUTIMAGE (700, 100 + yo
)-(730, 130 + yo
), litesquare&
'right IF piece
= 6 THEN '3 dots Left/down _PUTIMAGE (700, 70 + yo
)-(730, 100 + yo
), litesquare&
'mid _PUTIMAGE (700, 100 + yo
)-(730, 130 + yo
), litesquare&
'down _PUTIMAGE (670, 70 + yo
)-(700, 100 + yo
), litesquare&
'left IF piece
= 7 THEN '3 dots right/down _PUTIMAGE (670, 70 + yo
)-(700, 100 + yo
), litesquare&
'mid _PUTIMAGE (670, 100 + yo
)-(700, 130 + yo
), litesquare&
'down _PUTIMAGE (700, 70 + yo
)-(730, 100 + yo
), litesquare&
'left IF piece
= 8 THEN '3 dots horizonal _PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
'mid _PUTIMAGE (715, 85 + yo
)-(745, 115 + yo
), litesquare&
'right _PUTIMAGE (655, 85 + yo
)-(685, 115 + yo
), litesquare&
'left IF piece
= 9 THEN '3 dots vertical _PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
'mid _PUTIMAGE (685, 55 + yo
)-(715, 85 + yo
), litesquare&
'up _PUTIMAGE (685, 115 + yo
)-(715, 145 + yo
), litesquare&
'down IF piece
= 10 THEN '4 dots block _PUTIMAGE (665, 75 + yo
)-(695, 105 + yo
), litesquare&
'top left _PUTIMAGE (695, 75 + yo
)-(725, 105 + yo
), litesquare&
'top right _PUTIMAGE (665, 105 + yo
)-(695, 135 + yo
), litesquare&
'bottom left _PUTIMAGE (695, 105 + yo
)-(725, 135 + yo
), litesquare&
'bottom right IF piece
= 11 THEN '4 dots horizonal _PUTIMAGE (640, 85 + yo
)-(670, 115 + yo
), litesquare&
_PUTIMAGE (670, 85 + yo
)-(700, 115 + yo
), litesquare&
_PUTIMAGE (700, 85 + yo
)-(730, 115 + yo
), litesquare&
_PUTIMAGE (730, 85 + yo
)-(760, 115 + yo
), litesquare&
IF piece
= 12 THEN '4 dots vertical _PUTIMAGE (685, 40 + yo
)-(715, 70 + yo
), litesquare&
_PUTIMAGE (685, 70 + yo
)-(715, 100 + yo
), litesquare&
_PUTIMAGE (685, 100 + yo
)-(715, 130 + yo
), litesquare&
_PUTIMAGE (685, 130 + yo
)-(715, 160 + yo
), litesquare&
IF piece
= 13 THEN '5 dots horizonal _PUTIMAGE (625, 85 + yo
)-(655, 115 + yo
), litesquare&
_PUTIMAGE (655, 85 + yo
)-(685, 115 + yo
), litesquare&
_PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
_PUTIMAGE (715, 85 + yo
)-(745, 115 + yo
), litesquare&
_PUTIMAGE (745, 85 + yo
)-(775, 115 + yo
), litesquare&
IF piece
= 14 THEN '5 dots vertical _PUTIMAGE (685, 20 + yo
)-(715, 50 + yo
), litesquare&
_PUTIMAGE (685, 50 + yo
)-(715, 85 + yo
), litesquare&
_PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
_PUTIMAGE (685, 115 + yo
)-(715, 145 + yo
), litesquare&
_PUTIMAGE (685, 145 + yo
)-(715, 175 + yo
), litesquare&
IF piece
= 15 THEN '5 dots left/up _PUTIMAGE (655, 55 + yo
)-(685, 85 + yo
), litesquare&
_PUTIMAGE (685, 55 + yo
)-(715, 85 + yo
), litesquare&
_PUTIMAGE (715, 55 + yo
)-(745, 85 + yo
), litesquare&
_PUTIMAGE (715, 85 + yo
)-(745, 115 + yo
), litesquare&
_PUTIMAGE (715, 115 + yo
)-(745, 145 + yo
), litesquare&
IF piece
= 16 THEN '5 dots right/up _PUTIMAGE (655, 55 + yo
)-(685, 85 + yo
), litesquare&
_PUTIMAGE (685, 55 + yo
)-(715, 85 + yo
), litesquare&
_PUTIMAGE (715, 55 + yo
)-(745, 85 + yo
), litesquare&
_PUTIMAGE (655, 85 + yo
)-(685, 115 + yo
), litesquare&
_PUTIMAGE (655, 115 + yo
)-(685, 145 + yo
), litesquare&
IF piece
= 17 THEN '5 dots right/down _PUTIMAGE (655, 55 + yo
)-(685, 85 + yo
), litesquare&
_PUTIMAGE (685, 115 + yo
)-(715, 145 + yo
), litesquare&
_PUTIMAGE (715, 115 + yo
)-(745, 145 + yo
), litesquare&
_PUTIMAGE (655, 85 + yo
)-(685, 115 + yo
), litesquare&
_PUTIMAGE (655, 115 + yo
)-(685, 145 + yo
), litesquare&
IF piece
= 18 THEN '5 dots left/down _PUTIMAGE (715, 55 + yo
)-(745, 85 + yo
), litesquare&
_PUTIMAGE (715, 85 + yo
)-(745, 115 + yo
), litesquare&
_PUTIMAGE (685, 115 + yo
)-(715, 145 + yo
), litesquare&
_PUTIMAGE (715, 115 + yo
)-(745, 145 + yo
), litesquare&
_PUTIMAGE (655, 115 + yo
)-(685, 145 + yo
), litesquare&
IF piece
= 19 THEN '9 dots big block _PUTIMAGE (655, 55 + yo
)-(685, 85 + yo
), litesquare&
_PUTIMAGE (685, 55 + yo
)-(715, 85 + yo
), litesquare&
_PUTIMAGE (655, 85 + yo
)-(685, 115 + yo
), litesquare&
_PUTIMAGE (685, 85 + yo
)-(715, 115 + yo
), litesquare&
_PUTIMAGE (715, 55 + yo
)-(745, 85 + yo
), litesquare&
_PUTIMAGE (715, 85 + yo
)-(745, 115 + yo
), litesquare&
_PUTIMAGE (685, 115 + yo
)-(715, 145 + yo
), litesquare&
_PUTIMAGE (715, 115 + yo
)-(745, 145 + yo
), litesquare&
_PUTIMAGE (655, 115 + yo
)-(685, 145 + yo
), litesquare&
'Assign the generated pieces values
IF pens
= 1 THEN piece1
= piece
IF pens
= 2 THEN piece2
= piece
IF pens
= 3 THEN piece3
= piece
SUB DrawPiece
(piece
, x
, y
)
x = x - 30: y = y - 30 'center the mouse on a block
IF piece
= 2 THEN '2 dots horizonal
IF piece
= 3 THEN '2 dot vertical
IF piece
= 4 THEN '3 dots left/up
IF piece
= 5 THEN '3 dots right/up
IF piece
= 6 THEN '3 dots left/down
IF piece
= 7 THEN '3 dots right/down
IF piece
= 8 THEN '3 dots horizonal
IF piece
= 9 THEN '3 dots vert
IF piece
= 10 THEN '4 dots block
IF piece
= 11 THEN '4 dots horz
IF piece
= 12 THEN '4 dots vert
IF piece
= 13 THEN '5 dots horz _PUTIMAGE (x
+ 60 + 60 + 60 + 60, y
), litesquare&
IF piece
= 14 THEN '5 dots vert _PUTIMAGE (x
, y
+ 60 + 60 + 60 + 60), litesquare&
IF piece
= 15 THEN '5 dots left/up _PUTIMAGE (x
+ 60 + 60, y
+ 60 + 60), litesquare&
IF piece
= 16 THEN '5 dots right/up
IF piece
= 17 THEN '5 dots right/down _PUTIMAGE (x
+ 60 + 60, y
+ 60 + 60), litesquare&
IF piece
= 18 THEN '5 dots left/down _PUTIMAGE (x
+ 60 + 60, y
- 60 - 60), litesquare&
IF piece
= 19 THEN '9 dots big block _PUTIMAGE (x
+ 60 + 60, y
+ 60 + 60), litesquare&
'======================================================================
A$ = ""
A$ = A$ + "haIkJ^nDCL567NcEP4B2QT#4#;PSfFVNafZRRf?PG11B3B4bU=g31BT08PD]"
A$ = A$ + "06d>MJWj<Mj<MJ]E7_Dak=VJaQa;m3mO]OmM?KB8:SCo#BWMjIj7NVChLf\k"
A$ = A$ + "k3WcimLf\KXUN2R\lSAREbSdG:?ROnEah;n8TNYe#j5G7aGh?#jUON9Vh258"
A$ = A$ + "k;HTLUGP4IO>R_lcH4KYeIUBeE>5Ko=Ai7[di\L6oR_TAaS;5mi9cn<LjUGW"
A$ = A$ + ":G7Yb^6VnKO92_D>4NUL`kR?4AoZeQocU7RW;7R]hC#oAnAHIknPP^NPNkS2"
A$ = A$ + "]f201;S0]>21e5#X927APPcXK0[^PbHGD^\Y#_:5Ko=Aack[O^9D]UH<4\7V"
A$ = A$ + "e^6WaPN7AQ>K1YbP#S3oH77h;PWYN0igC9oN:2Tm9TKi`4Gj?aQ7mW8?l01Q"
A$ = A$ + "N9j326l0mF31]F20=FR0EVY[SihdaTP8i6d`h#`jHK#S9IXff4<dH?5SRo]4"
A$ = A$ + "5?V=mm\>13e=VjE#S]d\bR]YEZNc9Q:CaQJFl41jMBW3KR`CVe#HJlEPUYn["
A$ = A$ + ";^>>Zh?COO_D\WnofHT6WI?66;kO1o;n08NnO3FfAHXgV?U?fZ6^IHDdiQ^4"
A$ = A$ + "=Nl^Hh<g4Zgb`DK3[laFUB]DoS1JlgFl3_;\:j=6=?[Q1YjM[laFe`=CDnQF"
A$ = A$ + "5Ad;TGf=;3`7^EWoB^5TF7khDNO1clWK1FhNb^IZO^b=M]82_c]:j;lEXl;m"
A$ = A$ + "3Eeb9iB<j3jK>`6^Eg9h:gZeY8l?kM;iVVJh0gZiEM[O9gZ]?n`=mNI[_Ed]"
A$ = A$ + "12OEZ>JoS23ZlaFEb=S]6QifPA^6ohV^AXaPSFb=GaTjgTfko0:O\mo^m?jV"
A$ = A$ + "YFRP0Wi>`ElOQb_L<8Xj4:O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8OaZA6UaEWbHi?R<mDM:#^E"
A$ = A$ + "X37CQ5:e4fiQUQg>C1hgV[<\?Qe0EW<24OZ8djMc3nFk5_C>B`kU[D\Kb]39"
A$ = A$ + "b6NoLTR\:Ul]#=8gb=QMWM58SRDS\;C?;=cRe4UBDAUEBWW2l15:=67RWJL`"
A$ = A$ + "S;1kW8C:OFU7U<i[J3T1?5<hbOPRXa?2Yk]dmVokbLWcQh^OEVLFk\c24P3F"
A$ = A$ + "R2\gRDQg>3NhWm^iQME\ADZ]1PQN_24eMH8_ScC[g=;MOi\HOih6ojoXN\SM"
A$ = A$ + "Y6kH_J`KUf9`ffEEH[_OEh=gYAlKBc8fAJjafOGiHKoN5H[_S:l6o1Mh]f[E"
A$ = A$ + "l[fG=Hkke6fjn\6UmG=fj1<75^l_ROiN<Q]#]c_HgE5S]O0KaHKk_6\UMK6o"
A$ = A$ + "lMFE<fbjh=Xjff^YaNYECDfCe8]3g6kofXaiB#HMc3A^3So3_L>L%%%0"
btemp$ = ""
IF F$
<> "%" THEN C$
= C$
+ F$
B&
= B&
* 64 + ASC(MID$(B$
, t%
)) - 48 X$
= X$
+ CHR$(B&
AND 255): B&
= B& \
256
PPRINT
313, 13, 20, _RGB(255, 255, 255), _RGB(64, 0, 0), ".::10x10::." PPRINT
625, 13, 20, _RGB(172, 114, 88), _RGB(64, 0, 0), "Hi:" + STR$(hiscore
) PPRINT
35, 13, 20, _RGB(172, 114, 88), _RGB(64, 0, 0), "Score:" + STR$(score
)
SUB PPRINT
(x
, y
, size
, clr&
, trans&
, text$
) x1 = x + (t * size): x2 = x1 + size
y1 = y: y2 = y + size
_PUTIMAGE (x1
- (size
/ 2), y1
)-(x2
, y2
+ (size
/ 3)), pprintimg&