> For the complete documentation index, see [llms.txt](https://docs.webexp.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webexp.dev/exp98-shopify-theme/exp98/sections-and-features/games.md).

# Games

Eight mini-games, just for fun or handing out a discount code or the store password.

Eight games, each a block in the [Desktop](/exp98-shopify-theme/exp98/sections-and-features/desktop.md) section and on the [Password Page](/exp98-shopify-theme/exp98/sections-and-features/password.md). The desktop ships with three — Solitaire, Minefield and Worm — so the first look is calm; add the rest with **Add block**. Win one and it reveals a reward you choose.

| Game              | What it is                                                         |
| ----------------- | ------------------------------------------------------------------ |
| **MATCH.EXE**     | Memory pairs, played with your own product images                  |
| **WORM.EXE**      | Steer the worm into the food without hitting a wall or yourself    |
| **MINEFIELD.EXE** | Clear every square that isn't a mine. The first tap is always safe |
| **BRICKS.EXE**    | Break bricks with a paddle that follows your thumb                 |
| **WALLS.EXE**     | Grow walls to cut the field down while balls bounce around it      |
| **PIPES.EXE**     | Rotate pipes until the water reaches the drain. Always solvable    |
| **PUZZLE.EXE**    | A sliding tile puzzle cut from one of your product images          |
| **SOLITAIRE.EXE** | Klondike, one card at a time. Tap a card, then tap where it goes   |

Every game works on a phone — no dragging, nothing that needs a keyboard.

## The reward

| Setting               |                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------- |
| **Winning reveals**   | Nothing — it's just for fun (the desktop default), a discount code, or the store password |
| **Discount code**     | A code you've created under **Discounts**, typed exactly                                  |
| **Password revealed** | Must be your storefront password from **Online Store → Preferences**                      |

On the desktop, games are **just for fun** until you say otherwise: a win says *You win!* and nothing more. To hand out a discount, create the code under **Discounts** first, then set **Winning reveals** to *A discount code* and type it in. (A code box left empty behaves like *Nothing* — the theme never reveals a code that doesn't exist.) On the password page, games reveal the **password** by default, **OPEN**; change it to match yours.

**Winning a discount** shows the code with **Apply and shop** — which applies the code to the shopper's checkout and opens your catalogue in one go — and **Copy code** for anyone who'd rather keep it.

On the password page the store is locked, so there's nothing to apply it to yet. There the win shows the code with **Copy code** and an email field with **Save my code**: the shopper is added to your customers with the tags `newsletter`, `password-page`, `game-reward` and the code itself, and the page says it will email them the password and their code when you open — so on drop day, filter your customers by the `game-reward` tag and send them both.

**Winning the password** shows it with **Use it**, which opens the password form.

{% hint style="warning" %}
The reward is written into the page, so anyone who looks at the page's source can read it. That's fine for a tease — it's what this is — but put a **usage limit** on the discount code, and don't treat a game as the only way into a locked store. On the password page, the password form is always there beside it.
{% endhint %}

## Settings for every game

* **Icon** — the game's own icon, or Game, Star, Computer, Paint, Box, Bag.
* **Open on load** — the game's window opens by itself (desktop only).
* **Top offset**, **Left offset**, **Width** — where the window opens on a computer.

## Each game's settings

| Game      | Setting                                                                                                                    | Default |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ------- |
| MATCH     | **Products on the cards** — a collection. Empty plays with pixel icons                                                     | empty   |
|           | **Pairs** (3–8)                                                                                                            | 6       |
|           | **Move limit** (0–40, 0 is unlimited)                                                                                      | 0       |
| WORM      | **Target score** (3–25)                                                                                                    | 8       |
|           | **Board size** (12–32 squares)                                                                                             | 20      |
|           | **Tick speed** (80–260 ms, lower is faster)                                                                                | 140 ms  |
|           | **Food** — your logo or any small square picture in place of the red dot. Simple shapes read best; it's drawn one cell big | none    |
| MINEFIELD | **Grid size** (6–12)                                                                                                       | 9       |
|           | **Mines** (3–30)                                                                                                           | 10      |
| BRICKS    | **Bricks to break** (5–60)                                                                                                 | 20      |
|           | **Rows of bricks** (2–8)                                                                                                   | 4       |
|           | **Lives** (1–5)                                                                                                            | 3       |
| WALLS     | **Percent to clear** (40–90%)                                                                                              | 75%     |
|           | **Balls** (1–6)                                                                                                            | 3       |
|           | **Lives** (1–5)                                                                                                            | 3       |
| PIPES     | **Grid size** (3–7)                                                                                                        | 5       |
| PUZZLE    | **Picture** — or **Or a collection**, which uses its first product's image. Neither: a numbered puzzle                     | empty   |
|           | **Grid size** (3–5)                                                                                                        | 3       |
| SOLITAIRE | **Cards to the foundations** (4–52)                                                                                        | 8       |

For MATCH, square product photos with a clear silhouette work best. Six pairs is twelve cards, which fits a phone without scrolling.

## On phones

The games don't take up eight cells of the icon grid. They become one **Games** icon at the end of the bottom row, which opens a folder with all of them inside.
