> ## Documentation Index
> Fetch the complete documentation index at: https://hedgeem-api.qeetoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# F047 — Fast Play Config (2× animation speed)

> Fast Play config toggle halves all card animation durations — deal fly, community flip, stagger delays

# F047 — Fast Play

| Field  | Value               |
| ------ | ------------------- |
| ID     | F047                |
| Phase  | 3 — UI              |
| Jira   | HEDGE-175           |
| Status | TS ✅ · JS ⬜ · UMA ✅ |

## Business Rule

When the **Fast Play** setting is enabled, all card animation durations are halved — cards fly faster, flip faster, and the stagger delays between successive card launches are shorter. The game plays at 2× speed. The setting defaults to **off** (normal speed).

Sound effects are identical at both speeds — no alternate audio assets.

## V5 Implementation

**Setting key:** `userDisableCustomSetting5` in GAMELOGIC
**UI label:** "Fast Play" (`g_fast_play`)
**UI element:** `switchCustom5` checkbox toggle
**Event:** `EVENT.UI.CUSTOMSETTING5_TOGGLE`

`PLAY_SPEED` is recalculated from the setting each deal:

```javascript theme={null}
// baseGameScene.js lines 279-280, 410
GAMEVIEW.FAST_PLAY  = !GAMELOGIC.userDisableCustomSetting5;
GAMEVIEW.PLAY_SPEED = GAMEVIEW.FAST_PLAY ? 0.5 : 1;
```

Default: `GAMEVIEW.FAST_PLAY = false` → `PLAY_SPEED = 1` (gameView\.js line 11).

### Where PLAY\_SPEED is applied (v5)

| Animation                 | Formula                                             | File / Line         |
| ------------------------- | --------------------------------------------------- | ------------------- |
| Per-card stagger delay    | `delay × CARD_FLY_STEP × PLAY_SPEED`                | cardDesktop.js:48   |
| Hole card flight duration | `path / (2 / PLAY_SPEED)` = `path × PLAY_SPEED / 2` | cardDesktop.js:79   |
| Shoe launch animation     | `100 × PLAY_SPEED` ms                               | cardDesktop.js:120  |
| Card flip (device)        | `200 × PLAY_SPEED` ms                               | cardDevice.js:55    |
| Card gather animation     | `500 × PLAY_SPEED` ms                               | cardDesktop.js:148  |
| Win display               | `CARD_SHOW_WIN_TIME × PLAY_SPEED`                   | cardDesktop.js:207+ |

## V6 Implementation

A `_playSpeed` getter on `GameScene` returns `0.5` (fast) or `1` (normal) based on `cfgFastPlay`:

```typescript theme={null}
private get _playSpeed(): number { return this.cfgFastPlay ? 0.5 : 1; }
```

Applied in three places:

### 1. Hole card stagger delay

```typescript theme={null}
this.time.delayedCall((c + 1) * CARD_FLY_STEP * this._playSpeed, () => { ... });
```

Normal: cards launch at 300 / 600 / 900 / 1200 / 1500 / 1800 ms
Fast: cards launch at 150 / 300 / 450 / 600 / 750 / 900 ms

### 2. Hole card flight duration

```typescript theme={null}
duration: Math.sqrt(dx * dx + dy * dy) * this._playSpeed / 2
```

Normal: \~350–500 ms per card
Fast: \~175–250 ms per card

### 3. Community card flip duration

```typescript theme={null}
const flipHalf = 140 * this._playSpeed;
// shrink to 0 in flipHalf ms, expand back in flipHalf ms
```

Normal: 140 ms each half (280 ms total)
Fast: 70 ms each half (140 ms total)

### Config overlay

`cfgFastPlay` defaults to `false`. The config overlay toggle sets it live — no page reload required. The next deal picks up the new speed automatically (flag is read at deal time).

## Mathematics

**Normal speed (PLAY\_SPEED = 1):**

* Total deal time (3 hands, 6 cards): last card launches at 1800 ms + \~500 ms flight = \~2.3 s

**Fast speed (PLAY\_SPEED = 0.5):**

* Total deal time: last card launches at 900 ms + \~250 ms flight = \~1.15 s
* \~2× faster end-to-end

## Acceptance Criteria

| ID         | Criterion                                                                   |
| ---------- | --------------------------------------------------------------------------- |
| AC-F047-01 | Fast Play toggle in config overlay enables/disables immediately (no reload) |
| AC-F047-02 | Default state is **off** (normal speed)                                     |
| AC-F047-03 | With Fast Play on, all 6 hole cards complete their deal in ≤ 1.2 s          |
| AC-F047-04 | With Fast Play off, all 6 hole cards complete their deal in ≥ 2.0 s         |
| AC-F047-05 | Community card flip duration is \~140 ms (fast) vs \~280 ms (normal)        |
| AC-F047-06 | Sound effects are identical at both speeds                                  |

## Version Parity

| Version         | Status            | Notes                                                |
| --------------- | ----------------- | ---------------------------------------------------- |
| JS (v4)         | ⬜ Not yet audited | Likely same PLAY\_SPEED pattern                      |
| TypeScript (v6) | ✅ Implemented     | `_playSpeed` getter; config toggle un-stubbed        |
| UMA (v5)        | ✅ Implemented     | `PLAY_SPEED = 0.5/1` via `userDisableCustomSetting5` |

## V5 Source References

| File                                                          | Lines        | Purpose                                       |
| ------------------------------------------------------------- | ------------ | --------------------------------------------- |
| `source/client_source/src/js/Game/gameView.js`                | 11, 51–54    | `FAST_PLAY = false` default; timing constants |
| `source/client_source/src/js/Game/gameTypes/baseGameScene.js` | 279–280, 410 | `PLAY_SPEED` recalculation from setting       |
| `source/client_source/src/js/Game/gameTypes/cardDesktop.js`   | 48, 79, 120  | Stagger, flight, launch durations             |
| `source/client_source/src/js/Engine/modules/baseLogic.js`     | 1430–1445    | Toggle handler + `saveSettings()`             |
