Configuration

You can configure the colors and text of the game without touching any code.

You just need to edit the file game.config.json.

Below you can find an example with all available options and their defaults values:

{

    "colors": {
        "START": "#3c62a7",
        "GAME_BUTTONS": ["blue", "green", "red", "#fff200"],
        "PLAY_AGAIN": "#3c62a7",
        "MENU": "#999",
        "TEXT": "#fff"
    },

    // the text of the buttons
    "text": {
        "GAME_NAME": "Color Memo",
        "START": "START",
        "GAME_OVER": "Game Over",
        "MENU": "Menu",
        "PLAY_AGAIN": "Play again",
        "CORRECT_BUTTON_MSG": "It was",
        "MAX_SCORE": "Best"
    }
}

Setting the game size

You can specify the width and height of the game directly in the <canvas> tag

<canvas id="color-memory" width="500" height="700"></canvas>

On mobile devices the game will be full screen.

Table Of Contents

Related Topics

This Page