Write a web application: "Memory Game" for one player.
B eginning of the game: a player received two sets of identical cards in random order on a table. With the first card lift, a timer starts ticking, and a player's error score is set to 0.
ame round: Each round the player lifts two cards from the table. If both cards match - the cards disappear from the table. If the cards are different the player's error score increases by 1.
The player continues to guess card matches until the table is clear. E
nd of the game: The player is rated by the time elapsed from the beginning of the game and the error score.
GAME START:
The game starts with selecting the difficulty of the game:
Easy (5 cards per set), medium (10 cards per set), hard (25 cards per set)
After the user selects the game difficulty, an API is sent to the server with the user's choice.
The server initiates a game with a unique file_id. The server should keep track of the game process in a file ~root/game-boards/file_id.json
The server replies to the client with file_id. All proceeding communications from the client should include this file_id.
The client should display board with all cards in a closed state.
PROCESS:
At each round the player selects the first card - the card should reveal itself.
And then a player selects the second card - the card should reveal itself for 3 seconds.
If the cards match they should disappear.
If the cards don't match, the cards content should hide.
The client-side of the application should have no knowledge about the board, each time a user clicks on a card, the client should send a request to the server with the file id to receive a result of this player's action.
OUTPUT:
The game ends when all cards are matched. Show clearly to the player the elapsed time since the game started and the player's error score.
Additional Notes: