# Match-3 core (Unity 6)

Minimal match-3 board loop: swap adjacent tiles, clear runs of 3+, gravity, refill, cascades. No backend, pooling, or special candies — a foundation to extend.

| File | Role |
|------|------|
| `MatchBoard.cs` | Single `MonoBehaviour` — grid logic + colored cube renderer |

## Quick start

1. **Unity 6.3 LTS** — new 3D project (URP or Built-in).
2. Copy `MatchBoard.cs` into `Assets/Scripts/` (create the folder if needed).
3. Hierarchy: **Create Empty** → rename **Board**.
4. Add **Match Board** component to **Board**.
5. Scene must include **Main Camera** (default).
6. **Play** — click one cube, then an adjacent cube, to swap.

## Inspector

- **Width / Height** — grid size (default 8×8).
- **Color Count** — 3–6 fruit colors.
- **Spacing** — world units between tile centers.
- **Fall Speed** — slide animation toward slot targets.

## Web version

The portfolio ships a full **Fruit Crush** browser game (levels, score, combos):

- Play: https://parthpatel66.net/fruit-crush-game.html
- Setup notes: https://parthpatel66.net/match3-unity.html

## Extend next

- Score / combo multiplier in `ResolveCascades` (see comment in script).
- Invalid-move feedback (shake) like the web game.
- Object pooling instead of `Destroy` / `CreatePrimitive` per refill.
- URP materials instead of runtime `material.color` on primitives.
