> For the complete documentation index, see [llms.txt](https://doc.lucky-cycle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lucky-cycle.com/games/index/wheel.md).

# Wheel

{% hint style="warning" %}
Demo: <https://campaigns.lucky-cycle.com/utils/games?game=wheel>
{% endhint %}

1. [#configuration](#configuration "mention")
2. [#options](#options "mention")
3. [#assets](#assets "mention")

### Configuration

<details>

<summary>JSON</summary>

```json
{
    "options": {
      "idle_spin": true,
      "play_poke": true,
      "initial_rotation": 116,
      "spin_time": 5,
      "nb_slices": 5,
      "index_image_win": 0,
      "index_image_lose": 2,
      "use_rewards": false,
      "rewards": {},
      "accessibility": false
    },
    "texts": {
      "en": {
        "start": "Play now"
      },
      "fr": {
        "start": "Je joue"
      },
      "nl": {
        "start": "Speel nu"
      }
    },
    "images": {
      "en" : {
        "pin": GAME_URL + "/pin.png",
        "wheel": GAME_URL + "/wheel.png"
      },
      "fr" : {
        "pin": GAME_URL + "/pin.png",
        "wheel": GAME_URL + "/wheel.png"
      },
      "nl" : {
        "pin": GAME_URL + "/pin.png",
        "wheel": GAME_URL + "/wheel.png"
      }
    }
}
```

</details>

### Options

<table><thead><tr><th>Key</th><th>Type</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>idle_spin
</code></pre></td><td>Boolean</td><td>Make the wheel spin before click.</td><td>true</td></tr><tr><td><pre><code>play_poke
</code></pre></td><td>Boolean</td><td><mark style="color:red;">[Wheelio]</mark> Play the poke or not.</td><td>true</td></tr><tr><td><p></p><pre><code>initial_rotation
</code></pre></td><td>Int</td><td>Initial rotation of the wheel (in degrees).</td><td>116</td></tr><tr><td><pre><code>spin_time
</code></pre></td><td>Integer</td><td>Time for which the wheel will keep spinning before stopping (in seconds).</td><td>5</td></tr><tr><td><pre><code>nb_slices
</code></pre></td><td>Integer</td><td>Indicate the number of quarters in the wheel (invisible for the customer but needed for calculations).</td><td>5</td></tr><tr><td><pre><code>index_image_win
</code></pre></td><td>Integer</td><td>Select on which slice of the wheel it will stop in case of <em>win</em> <mark style="color:orange;">(and if </mark><em><mark style="color:orange;">use_reward_image</mark></em><mark style="color:orange;"> is set to </mark><em><mark style="color:orange;">false</mark></em><mark style="color:orange;">)</mark>.</td><td>0</td></tr><tr><td><pre><code>index_image_lose
</code></pre></td><td>Integer</td><td>Select on which slice of the wheel it will stop in case of <em>lose</em>.</td><td>2</td></tr><tr><td><pre><code>use_rewards
</code></pre></td><td>Boolean</td><td>Indicate if the wheel should have a specific number of slices (see <em>nb_slices</em>) or if rewards should determine it.</td><td>false</td></tr><tr><td><p></p><pre><code>rewards
</code></pre></td><td>Object</td><td>If <em>use_rewards</em> is set to true, should map the rewards and positions.</td><td>{}</td></tr><tr><td><p></p><pre><code>accessibility
</code></pre></td><td>Boolean</td><td>Switches the game to a <em><mark style="color:$warning;"><strong>reduced motion</strong></mark></em> version.</td><td>false</td></tr><tr><td><pre><code>start
</code></pre></td><td>Text</td><td>Text for the button that is displayed at the start of the game.</td><td>"Play now" / "Je joue" / "Speel nu"</td></tr></tbody></table>

### Assets

<table><thead><tr><th>Key</th><th>Size</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>pin
</code></pre></td><td>120 x 120px</td><td>Let the customer know on which quarter the wheel stopped.</td><td><a href="https://statics.lucky-cycle.com/files/_games/wheel/pin.png">/pin.png</a></td></tr><tr><td><pre><code>wheel
</code></pre></td><td>550 x 550px</td><td>Visual of the wheel.</td><td><a href="https://statics.lucky-cycle.com/files/_games/wheel/wheel.png">/wheel.png</a></td></tr></tbody></table>
