Giter Site home page Giter Site logo

memory-game's Introduction

Kid's Memory Game

This is a project to complete the first module of my Software Engineering certification @Per Scholas

How is the game played? The player selects the first card, the card flipps. When the second card is selected, if they match: cards keep being flipped. If cards don't match, they will both flip back. Player keeps selecting cards, two by two, either until all cards are selected or time runs out.

Features

Win state: all cards are matched within timer.

Lose state: cards are not macthed within timer.

Multiple rounds: cards will be automaticly shuffled and ready to play again when current game round is over.

Reset Game: at any time, player can choose to click on the New Game button to restard the game.

Click Count: added a click count tracker for scoring.

Tech Stack

1. HTML
2. CSS with FlexBox
3. JS    

The purpose is to demonstrate my knowledge of:

* Semantic HTML and application structure
* Styling and appearance using CSS including FlexBox
* Dynamic events and interactions utilizing JavaScript
* Classes and Object Oriented Programming
* DOM manipulation

Challenges

I had two main challenges:

  1. I chose to compare cards using their class id and not names. This was done by this line: card.setAttribute('data-id', picturesCollection[i]); As you can see on elements, this code line made 'data-id' = card names, therefore, I could compare them.

  2. My flipping wasn't showing the back of my card. To solve that, on the createFrame function I had to add 2 more div's, each representing a card's face (front/back) so that I could toggle them using the flipping function.

Images

Start Screen

alt text

Win State

alt text

Lose State

alt text

Resources

(https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotateY)

memory-game's People

Contributors

vanessaxb avatar

Stargazers

De Sean Ward avatar  avatar Keith Andrew Martinez avatar Ron Powell avatar Ange avatar Kevin avatar  avatar Mahamadou Tirera avatar  avatar  avatar  avatar Clement Kinyui Ndimuangu avatar Cynthia Chioma Obia avatar  avatar  avatar Alexander Gomez avatar Fatima Rimi avatar  avatar

Watchers

Keith Andrew Martinez avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.