# Quarry

Falling blocks on the library's Flip-Dot board, as a handheld made of kit parts. Move and turn pieces to fill whole rows; a full row flips over as a wave of discs and the stack comes down.

Object · With a Pass · https://tactileui.dev/objects/quarry

> The code and styling for this object come with the Pass. Sign in if you have one. Sign in: https://tactileui.dev/auth/sign-in The price: https://tactileui.dev/pricing

## Anatomy

Shared handheld case, Flip disc field, Seeded bag, Wall kick, Fixed step loop, Pointerdown keys, Segment lcd digits, Swipe on field, Concentric corners, Scale as an object

## Usage notes

A game you could hold, drawn from the kit's own parts and the library's Flip-Dot: a moulded case with a tall flip-disc field, a small next-piece board, an LCD for score, rows, level and best, a D-pad, two round keys, a Start key, a sound switch and a speaker grille. Pieces of four squares fall into the field; move and turn them to fill whole rows. A full row flips over as a wave across the discs, then the stack comes down. Every ten rows the pieces fall faster, and a piece with no room ends the run. The best score is kept on the visitor's device. It shares its case with the library's other handheld games.

## Options

| Option | Type | Description |
| - | - | - |
| sound | boolean | The switch on the case. On, the discs click as they flip and the case beeps at a level or a miss, once you have pressed a key (a browser allows sound only after a press). The visitor’s own setting is kept on their device. |
| label | text | What a screen reader calls the case. |

## Methods

- hooks
- update
- destroy

## States

1. **How to play**: Press Start (or Enter). Pieces of four squares fall into the field; move and turn them so they fill whole rows. A full row flips over and the stack comes down. Every ten rows the pieces fall faster; when the next piece has no room, the game is over.
2. **Keys**: Left and Right (or A and D) move and repeat when held, Down (or S) drops faster, Up (or W) and X turn, Z turns back, Space drops all the way, Enter or P starts and pauses. On the field: slide sideways to move, tap to turn, slide down to drop faster, flick down to drop all the way.
3. **Made of**: The kit's Panel (the case), LCD (score, rows, level and best in seven segments), Lamp (state lamp), Key (D-pad, the round Drop and Turn keys and the primary Start key), Tray (the wells), Switch (sound) and Grille, with the library's Flip-Dot for the field and the next piece.
4. **Idle**: The field shows a stack with a well four rows deep and the long piece over it; the counters read zero, the best is shown, the screen says Press start.
5. **Playing**: A move the field refuses does nothing; a turn with no room says No room.
6. **Clearing rows**: A full row shows whole for a moment, then its discs flip over as a wave, and the rows above come down.
7. **Level up**: 
8. **Paused**: Enter or P pauses and carries on; a hidden tab pauses by itself. Nothing falls while paused.
9. **Game over**: When the next piece has no room the field flips up row by row from the bottom and the next board goes dark. The LCD says Game over, or New best; a new best is kept on this device.
10. **Sound**: The discs click as they flip (the board's own sound) and the case beeps at a level and at game over. The switch turns it all off; the choice is remembered.
11. **Reduced motion**: Keys shade but do not move, and the discs swap at once instead of flipping; a game over is one switch.
12. **Twelve finishes, two volumes**: The case reads the finish and volume tokens only: aluminium, graphite and the other ten finishes, Tactile or Quiet.

## How it works

Original. The case is the library's shared handheld (originals/components/shared/handheld), drawn from the kit's parts at one size and scaled as an object; the field and the next-piece board are the library's Flip-Dot (originals/components/flip-dot), which Quarry imports and tears down with itself. It needs the Tactile UI Kit's stylesheets on the page; the Code tab's example links them from ./kit/.
