> 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/memory.md).

# Memory

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

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

### Configuration

<details>

<summary>JSON</summary>

```json
{
  "options": {
    "size": 145,
    "show_time": true,
    "one_pair_mode": false,
    "use_countdown": false,
    "timer": 60,
    "pairs": 6,
    "background_color": "transparent",
    "header_text_color": "white",
    "header_background_color": "black"
  },
  "texts": {
    "en": {
      "time": "Time",
      "unit": "s"
    },
    "fr": {
      "time": "Temps ",
      "unit": "s"
    },
    "nl": {
      "time": "Tijd",
      "unit": "s"
    }
  },
  "images": {
    "background":  GAME_URL + "/background.png",
    "image_list": [
      GAME_URL + "/item-1.png",
      GAME_URL + "/item-2.png",
      GAME_URL + "/item-3.png",
      GAME_URL + "/item-4.png",
      GAME_URL + "/item-5.png",
      GAME_URL + "/item-6.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>size
</code></pre></td><td>Integer</td><td>Size of an item (square), in pixels.</td><td>150</td></tr><tr><td><pre><code><strong>show_time
</strong></code></pre></td><td>Boolean</td><td>Display the header with timer (increasing).</td><td>true</td></tr><tr><td><pre><code>one_pair_mode
</code></pre></td><td>Boolean</td><td>Stops the game at the first pair.</td><td>false</td></tr><tr><td><pre><code>use_countdown
</code></pre></td><td>Boolean</td><td>Add a timer to the game.</td><td>false</td></tr><tr><td><pre><code>timer
</code></pre></td><td>Int</td><td>If <em>use_countdown</em> is set to <mark style="color:$success;">true</mark>, gives the allowed time for the game.</td><td>60</td></tr><tr><td><pre><code>pairs
</code></pre></td><td>Int</td><td>Number of pairs to be found <mark style="color:$warning;">(must match the number of</mark> <em>image_list</em> <mark style="color:$warning;">visuals)</mark>.</td><td>6</td></tr><tr><td><pre><code>background_color
</code></pre></td><td>String</td><td>Background colour (visible if no image).</td><td>"transparent"</td></tr><tr><td><pre><code>header_text_color / _background_color
</code></pre></td><td>String</td><td>Colour / background of the header.</td><td>"black" / "white"</td></tr><tr><td><pre><code>time / unit
</code></pre></td><td>String</td><td>Texts for the timer.</td><td>"Time" / "s" --> "Time: <mark style="color:purple;">[time]</mark>s"</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>background
</code></pre></td><td>150 x 150px</td><td>Back visual of the card (common to all cards). <em><strong>Size should match "size" option.</strong></em></td><td><a href="https://statics.lucky-cycle.com/files/_games/memory/background.png">/background.png</a></td></tr><tr><td><pre><code>image_list
</code></pre></td><td>150 x 150px (each)</td><td>Front visual of the cards to be matched (two cards per visual). <em>Array should contains <strong>6 images</strong>, but can go from 1.</em></td><td><a href="https://statics.lucky-cycle.com/files/_games/memory/item-1.png">/item-1.png</a></td></tr></tbody></table>
