Git Product home page Git Product logo

memory-game's Introduction

Memory Game

Match the cards before you run out of time! โฐ

Table of contents

Overview

Screenshots

Memory game preview

Memory game win preview

Memory game lost preview

Memory game mobile preview

Memory game lost mobile preview

Links

Features

  • Flipping cards
  • Cards arranged randomly
  • Countdown timer
  • Levels, with increasing cards
  • Timer increases with each level
  • Matching the correct pair rewards extra 2 seconds

Run Locally

Clone the project

  git clone [email protected]:ishantbhurani/memory-game.git

Go to the project directory

  cd memory-game

Run index.html

  <browsername> index.html

E.g.

  firefox index.html
  google-chrome index.html

My process

Built with

  • Semantic HTML5 markup
  • Flexbox
  • CSS Grid

What I learned

  • card flip animation
.card {
  width: 150px;
  height: 150px;
  position: relative;
  perspective: 800px;
  cursor: pointer;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: 0.6s;
  box-shadow: 0.2em 0.2em 0.5em rgba(0, 0, 0, 0.2);
  border-radius: 0.5em;
  z-index: -1;
}

.card::before {
  background: url("../images/default.jpg") center/cover no-repeat;
}

.card::after {
  background: var(--card-img, hsl(0, 0%, 90%, 0.5)) center/cover no-repeat;
  transform: rotateY(180deg);
}

.card.flipped::before {
  transform: rotateY(-180deg);
}

.card.flipped::after {
  transform: rotateY(0);
}
  • Countdown timer
  • Dynamic grid elements

Useful resources

Author

Credits

memory-game's People

Contributors

ishantbhurani avatar

Watchers

 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.