# Memory Game (H5P.MemoryGame)

Cards face down, turned two at a time, until every pair is found.

- Each item of `cards` is a pair: `image` and `imageAlt`, and, for a pair of two different pictures, `match` and `matchAlt`. Without `match` the pair is two copies of `image`.
- `description` is shown when the pair is found: say what it shows.
- Square-ish pictures work best; at least two cards.

## Example

```json
{
  "type": "H5P.MemoryGame",
  "params": {
    "cards": [
      { "image": { "path": "danube.png" }, "imageAlt": "The Danube in Budapest", "description": "The Danube flows through four capitals." },
      { "image": { "path": "thames.png" }, "imageAlt": "The Thames in London", "description": "The Thames flows through London." }
    ]
  }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.MemoryGame 1.3

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `cards` list 2–100 of, required — Cards
  - `image` image file, required — Image
  - `imageAlt` text, required — Alternative text for Image: Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users.
  - `audio` audio files — Audio Track
  - `match` image file — Matching Image
  - `matchAlt` text — Alternative text for Matching Image: Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users.
  - `matchAudio` audio files — Matching Audio Track
  - `description` text — Description: An optional short text that will pop up once the two matching cards are found.
- `behaviour` group — Behavioural settings
  - `useGrid` boolean = true — Position the cards in a square
  - `numCardsToUse` whole number 2– — Number of cards to use: Setting this to a number greater than 2 will make the game pick random cards from the list of cards.
  - `allowRetry` boolean = true — Add button for retrying when the game is over
- `lookNFeel` group — Look and feel
  - `themeColor` text = "#707070" — Theme Color: Choose a color to create a theme for your card game.
  - `cardBack` image file — Card Back

16 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.MemoryGame --all` lists them, for a source to set one.

<!-- End of the generated section. -->
