Giter VIP home page Giter VIP logo

minhkhang1795 / udacity-matching-game Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 124 KB

The cards are arranged randomly on the grid with the symbol face down. The gameplay rules are very simple: flip over two hidden cards at a time to locate the ones that match!

Home Page: https://minhkhang1795.github.io/udacity-matching-game/

License: MIT License

CSS 35.71% HTML 27.56% JavaScript 36.73%
javascript memory-game fend udacity-frontend-nanodegree

udacity-matching-game's Introduction

Matching Game Project

Matching Game is the second project for Udacity Front-End Web Developer Nanodegree Program.

How The Game Works

The game board consists of sixteen "cards" arranged in a grid. The deck is made up of eight different pairs of cards, each with different symbols on one side. The cards are arranged randomly on the grid with the symbol face down. The gameplay rules are very simple: flip over two hidden cards at a time to locate the ones that match!

Each turn:

  • The player flips one card over to reveal its underlying symbol.
  • The player then turns over a second card, trying to find the corresponding card with the same symbol.
  • If the cards match, both cards stay flipped over.
  • If the cards do not match, both cards are flipped face down.

The game ends once all cards have been correctly matched.

Live Demo on Github Page

Implemented functionalities

  • Shuffle the cards when a match begins.
  • The player can click on a card to flip it open.
  • Two opened cards if matched will stay opened; otherwise, the cards are flipped face down.
  • Show animations when opening or closing a card and when two cards are matched or unmatched.
  • Timer on the top to show how much time the player has spent.
  • Counter on the top to show how many times the player flips the cards.
  • Star panel to show the player's performance.
  • Restart button allows the player to restart the game.
  • When the player wins the game, the victory modal will pop up.
  • The game will show a warning if the player tries to tamper with the back-end logic.

Credits

Note

Incompatible with Edge and Explorer.

MIT License

Copyright 2018 Minh-Khang Vu

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

udacity-matching-game's People

Contributors

minhkhang1795 avatar richardkalehoff avatar

Stargazers

 avatar

Watchers

 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.