# RCWeb Stack Above

**Stack Above** is a shared-screen reset-loop party card game for RCWeb. One browser tab becomes a bright shared playfield with the room code, turn prompts, draw pile, play stack, scoreboard, and animated round celebrations. Each player joins from a phone and keeps a private hand there, so the big screen can stay simple and exciting for kids.

It is designed for quick family play: open the display on a TV, projector, or laptop, let players scan the QR code, and begin as soon as at least two phones have joined.

![icon](pwa-512x512.png "Stack Above Display Icon")

## Screenshot
![screenshot](screenshot.png "Stack Above")

## The Game

Stack Above keeps the same RCWeb pattern as Stack Snap, but shifts to a simpler loop-based ruleset. On your turn you either:

- play a card that matches the top card
- play the next higher card in the ladder
- draw one card
- sit out for the rest of the round if you are stuck

The ladder loops in a circle:

- `1` can go on `1` or `Reset`
- `2` can go on `1` or `2`
- `3` can go on `2` or `3`
- `4` can go on `3` or `4`
- `5` can go on `4` or `5`
- `6` can go on `5` or `6`
- `Reset` can go on `6` or `Reset`

Stack Above supports **2 to 8 players**. Each round starts with **6 cards** per player, and scores keep running from round to round with no fixed limit.

## How To Play

Open `/stack-above/` on the shared screen. Players scan the QR code to open `/stack-above-c/` on their phones in the same room. When at least two players have joined, any phone can start.

Each stack contains the bright number cards `1` through `6` plus the special **Reset** card. Players try to get rid of their hands by following the stack upward. If a turn gets tricky, drawing a card is always allowed, and players can also choose to sit out for the rest of the round instead of taking more cards.

The round ends when:

- one player empties their hand
- everyone else has sat out, leaving one player still active

When a round ends, every other active player keeps the cards left in their own hand as penalty points:

- number cards are worth their face value
- each reset card is worth **10 points**

After a round ends, Stack Above celebrates the winner and automatically deals the next round after a short countdown. Scores stay on the board until someone at the table decides to stop or restart.

Late arrivals can still join mid-round and will enter on the next deal.

## Powered By RCWeb

Stack Above uses RCWeb's room-based WebSocket layer to turn ordinary browsers into a local multiplayer card table. The display owns the draw stack, shuffling, turn order, scoring, and round timing. Controllers send simple play, draw, and sit-out actions back to that shared source of truth.

Phones stay lightweight: they store only a player identity and name, receive private hand snapshots from the display, and send moves with `rc.sendFunctionCall`. That makes the game resilient to reconnects and easy to launch on almost any device with a browser.
