Write a web application: "Memory Game" for one player.

Memory game

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.

Test Case Implementation

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:

  • You may choose your way to represent the cards
  • You may use any open source libraries in your implementation
  • Stack for implementation
    • Client: React JS
    • Server: C# ASP.NET Core
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.