Coder Social home page Coder Social logo

tbrlpld / remember-me Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 988 KB

Web browser memory game (created for the Udacity Nanodegree "Intro to Programming")

Home Page: https://rememberme.lpld.io/

HTML 37.48% CSS 12.52% JavaScript 50.00%
game memory-game card udacity udacity-nanodegree jquery javascript

remember-me's Introduction

RememberMe

A memory game web application. This web application was created as the final project for the Udacity Nanodegree 'Intro to Programming'.

Goal of the game is to find the matching pairs of cards.

The deck consists of 16 cards which are face down. Two cards always have the same symbol on the face side (not shown initially). The card deck is shuffled using the Dustenfeld algorithm.

To show the face of a card the user can click its back. Once two cards are face up, they are compared. If the symbols on the cards match, they stay face up and are marked as matched. If the symbols do not match, both card faces are flipped back down.

Once all cards are matched the user has won the game.

Clicking two cards counts as one move. The number of moves required to solve the memory game determines the star rating. Everything up to 16 moves counts as a three star rating, from 17 to 24 a two star rating is given. Everything above counts as a one star rating.

Also, a timer is running -- visible to the user. This is just for the user's information.

If the user gets stuck during the game, the "Restart" button allows to start over. Restarting the game resets the timer, the moves counter, and the star rating. Most importantly, all cards are flipped face down and shuffled again.

Installation

Dependencies

  • Game is developed using jQuery 3.2.1 (jquery-3.2.1.min.js).

Future Development Ideas

  • Add option in welcome message to select game size (16, 25).

Known Issues

  • On the HTC Desire S (considered a legacy device): When the game is loaded on the proprietary browser, only the welcome modal is shown. The game is not visible in the background as in other browsers. Also, when "play game" is pushed the welcome modal does not disappear.
  • DOM manipulation possible. In the current way the game is created, it is possible to check for matching symbols by using the browsers development features. Also, the matching of cards is determined by adding a CSS class to the card elements (spacers). This can also be done with the browsers developer tools. To prevent these interactions it would be necessary to create a proper back end application which handles the game logic and stores the status of the game.

Udacity Review Feedback

  • Symbol array duplication by concatenation, rather than looping. -- That really does seem easier. -- Implemented.
  • Moves string: You could also use the conditional (ternary) operator to make a word singular or plural which is good to do in my opinion so you can get rid of unnecessary if statements. -- Implemented.
  • It is a good practice to remove console.log statements from finished/production apps. -- Implemented.
  • Very nice README. I'd also include instructions on how someone could play the game if they downloaded your files (it's more important if the project is on GitHub, or will be on GitHub) - for this project it would be really simple, just opening index.html in a web browser. But I think it's still important to mention that so they know exactly what to do as sometimes you might have to install some dependencies or otherwise configure your local machine to run some downloaded code. -- Implemented.

remember-me's People

Contributors

tbrlpld avatar

Watchers

James Cloos 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.