There are four options available in Memory Game:
- cards – there are different arrays of cards that you can use in the game
- onGameEnd – this is a callback function that will automatically run on its own once when the game is finished
- wrapper id – you need to enter the id of the respective div that you would like to attach to the memory
- onGameStart – this particular function will run itself when you open the game for the first time
The Memory Game is currently available in the 8 x 4 grid which means that it can fit a maximum of 32 cards. So, if you want to run the Memory Game at 3 different levels, you will need to mention unique ids for all the 16 cards and map it to its image path.
As far as the Public Function is concerned, there is only one available which is the reset Game function. As the name pretty much says, this function will reset the game to its original state and restart the game from the beginning.
Learning about these functions, cards, Sass, and codes will help you create and manage the game more effectively.