Skip to content

Latest commit

 

History

History
225 lines (148 loc) · 11.3 KB

File metadata and controls

225 lines (148 loc) · 11.3 KB

Memory Cards

Memory Cards Game is a fun and interactive web-based game designed for anyone looking to improve their memory skills. By matching pairs of cards, players can challange themselves and enhance their concentration while enjoying an engaging experience. The game consists of 18 cards (9 pairs). Before starting, players can read the rules by clicking the "How to Play" button.

Players have the option to start the game by clicking the "Start" button or simply flipping any card. Once the first pair of cards is clicked, a timer begins, and moves are tracked. Players can pause the game or restart it at any time, making it easy to take breaks and try again.

Screenshot of Responsive Mockup

Project live view

Contents

User Experience (UX)

  • User Stories:

    1. As a player, I want to read the game rules.
    2. As a player, I want to start a new game and pause at any time.
    3. As a player, I want to click on card to easily flip it, to see what image is on the other side.
    4. As a player, I want to match two cards, to remove them from the board.
    5. As a player, I want to restart the game at any time, so I can try again with a fresh start.
    6. As a player I want to see a congratulatory message when I match all the cards, so I know I have completed the game, with tracked moves and time.
    7. As a player, I want to see a game over message when I exceed the time limit, so that I know the game has ended.

Features

Existing Features

  • Title with logo and How To Play button

    • By clicking this button user can open and read the game rules.

    Screenshot of How to play button

    • Icon with Instructions can be easily closed by clicking anywhere on the screen or on the close button.

    Screenshot of rules

  • Home Page

    • The landing page features a clean and simple design including a logo, the game title, and 18 unflipped cards arranged in a grid. Player can interact with the game using four buttons: "How To Play", "Start", "Pause" and "Reset".

    Screenshot of Home Page

  • Control Panel

    • The game includes a control panel with three buttons:"Start", "Pause" and "Reset". Additionally, the panel displays the recorded number of moves and elapsed time during gameplay.

    Screenshot of Control Panel

  • Winner Icon

    • When the player wins, the winner icon appears, displaying the tracked time and number of moves along with a celebratory confetti animation.

    Screenshot of winner icon

  • Game Over Icon

    • If the player exceeds the time limit of 100 seconds, a game over icon appears, signaling the end of the game.

    Screenshot of game over icon

Future Features:

  1. Sound effect.
    • Introduce background music to make the experience more immersive.
  2. Multiple difficulty levels.
    • Add different difficulty modes with varying grid size.
  3. Themes.
    • Allow players to choose from different card themes (sports, fruits).
  4. Progressive gameplay.
    • Add levels, where the number of cards grows.

Design

  • Layout:

    • The game features are simple, grid-based with 18 cards, unflipped at the start of the game.
  • Color:

    • The game uses a pink, purple, and blue shades promoting positive atmosphere.

    Screenshot of colors

  • Title:

    • "Yeseva" font family from Google Fonts, is chosen to create the title, and rules for this game.
  • Logo and cards images:

    • Icons from Flaticon are used to create both, the game logo, and the images on the cards.

Wireframes

Screenshot of desktop Screenshot of tablet Screenshot of mobile

Technologies Used

Languages Used

Content

Frameworks, Libraries & Programs Used

Testing

Manual Test Cases and Results

  • Testing completed on the below browser:
    • Chrome
    • DuckDuckGo
    • Edge
    • FireFox
Test Steps Expected Results Actual Results Pass/Fail Comments
1 Check 'How to play' button Click 'How to play' button Game instructions should be displayed Instructions displayed correctly Pass
2 Check if game starts correctly Click the 'Start' button Game starts and timer begins Game started, timer began correctly Pass
3 Verify image load on cards Click the card to flip Images should appear on the flipped cards Images failed to load due to json incorrect folder and path Fail Fixed by moving data folder with cards.json file into assets folder and correcting the path in cards.json file.
4 Test card flipping Flip any two cards The two cards should flip and show their images Cards flipped and showed the images Pass
5 Test 'Pause' button Click the 'Pause' button Game should pause, and timer should stop Game paused, timer stopped Pass
6 Exceed time limit Start the game. Let the timer exceed 100s Game Over' icon should appear Game Over' icon appeared after 100 seconds Pass
7 Winning conditions Match all the pairs A winner icon should appear along with confetti Winner icon and confetti displayed correctly Pass
8 'Restart' button Click the 'Restart' button Game should restart, all cards unflipped, timer and moves restart Game restarted and cards returned to original state Pass

Automated Validator Testing

Screenshot of html test

Screenshot of css test

Screenshot of js test

Screenshot of web speed

Screenshot of desktop test

Bugs

  • Images not loading with URL.

    • In earlier versions of the project, images for the cards were loaded from the a json file. However, after deploying my project, I have noticed, that cards appear blank when flipped. The images failed to load.
  • Solution.

    • To fix this bug, I verified the path in json file and ensure was correct.
    • I have moved data folder with json file into assets folder and changed the path in json file.

Unfixed Bugs

  • No unfixed bugs.

Deployment

Version Control

  • The site was developed using Gitpod editor and pushed to GitHub, to the remote repository memory-card-game.
  • Git commands were utilized to push the code to the repository.

Deployment to Github Pages

  • This website was deployed to GitHub Pages with the following steps:
  • Navigate to the repository on GitHub
  • Go to the settings tab in repository
  • Scroll down to the "Pages" section
  • Select the branch
  • Under "Source" select the branch to deploy ('main')
  • Save the settings
  • Link to the website: Memory Cards Game

How to clone the repository

  • Go to the https://magda-r-bit.github.io/memory-card-game/ repository on GitHub
  • Click on the Code button located above the project file
  • Click on HTTPS and copy the repository link
  • Open the IDE and paste the copied git url into the IDE terminal
  • Project is created as a local clone

Credits

  • Special Thanks:
    • Spencer Barriball- For your mentorship. Your insights and advices were crucial to the success of this project.

Inspiration