A downloadable game

Stacks 10L

==========

A number puzzle game in 10 lines/basic by Csabo/LOD, 2021.

Gameplay & Rules

================

You play by moving blocks from one stack to another.

To move a block, press 1-3 to select its stack,

then press 1-3 to select the target.

Only the top block in each stack can be moved.

After each move, the highlighted block from the top will

drop down.

If there are no good moves, you can skip moving any blocks

by press D (for Drop).

Blocks with the same numbers merge. This scores points and

frees up space.

The game is over when a stack fills up. Good luck!

Variables

=========

b = Board, an array of 28 elements, holding 4 * 7 pieces.

    The 4th column is not used.

h = Highest, the highest block currently on screen.

    Used for generating new pieces.

c = Column (that is about to drop).

f = "From" column (1-3 when selected, 4 = no selection).

v = Value of pressed key.

s = Score.

x = the current position.

    Used as a parameter when drawing a piece or dropping.

g$ = Gray shaded characters (for "empty" places).

c$ = Cursor moves, down one and left 9.

b$ = Block characters (spaces).

s$ = Score text.

Lines

=====

0-1 Initialize, display the entire board.

2   Game loop, create a new block, rotate columns.

3   Keyboard loop, loops until a valid key is pressed.

4-5 Make the selected move.

6-7 Drop subroutine. Start from position X.

    Merges blocks, performs scoring, plays sound.

8-9 Display subroutine, draws block in position X.

Download

Download
stacks_10l.prg 715 bytes
Download
stacks_10l.txt 1 kB

Leave a comment

Log in with itch.io to leave a comment.