Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.64 KB

File metadata and controls

33 lines (20 loc) · 1.64 KB

DEVELOP A MEMORY GAME

DESCRIPTION

The goal of this challenge is to develop a memory game. The game consists of a grid of cards. Each card has a symbol on one side. The cards are arranged randomly on the grid with the symbol face down. The player flips two cards over each turn. If the two cards have the same symbol, they remain face up. Otherwise, the cards flip back over after a short period of time. The goal of the game is to match all pairs of cards.

INSTRUCTIONS

1. Choose a programming language of your choice.

2. Choose a topic for your cards. Some examples are:

    - Colors 
    - Star Wars characters (you can choose this API https://akabab.github.io/starwars-api/#alljson)
    - Pokemon characters (you can choose this API https://pokeapi.co/)
    - Countries (you can choose this API https://flagsapi.com/#quick)

3. Develop the game. You can use the following steps as a guide:

    - Create a grid of cards. The grid should be 4x4, 6x6, or 8x8.
    - Choose number of players. The game can be played by one or two players.
    - Add a card to the grid. The card should have a symbol on one side.
    - Shuffle the cards on the grid.
    - Add a click event to each card. When the player clicks a card, the card flips over.
    - When the player clicks two cards, check if the cards have the same symbol. If the cards have the same symbol, the cards remain face up. Otherwise, the cards flip back over.
    - When all pairs of cards are matched, the player wins the game.

Use Copilot chat to support your learning and development. Use Copilot to speed up your development.