Code Monkey home page Code Monkey logo

memory-game's People

Contributors

hmerin avatar wgil avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

memory-game's Issues

Timer

The moment the user clicks the first card, the timer should starts.
The moment the user clicks the last card, the timer should stop.

Remember to show it in the Menu and at the end of the game.
Improve its styles.

The game cannot be played on iPhone

The game cannot be played on iPhone

When you start the game on a mobile phone in portrait mode, you can see a screen indicating that you have to rotate your phone to be able to play the game.

Users have reported that opening the game on an Iphone, they just see a blank screen. ๐Ÿ˜Ÿ

To solve this issue, you first have to make a little research to know exactly which browsers are affected๐Ÿง. Currently, we are using the Screen.orientation property to detect the orientation device and the orientationchange event to hide/show the Game. You can find this logic in src/containers/Orientation.js.

I am not pretty sure how to approach this issue, probably we can create a polyfill or simply get rid of Screen.orientation and make use of resize and make it work in certain breakpoint Any suggestion would be appreciated. ๐Ÿ™

Sibling cards should be paired

  • There cannot be more than two cards flipped at the same time.
  • Two flipped cards should be paired if the first card's sibling_id match the other card's id.
  • If cards are paired, delete them from the cards collection.
  • If cards are not paired, set flipped to false.

Restart

Make the restart button works from the menu.

Add CI

Add a CI to run the test suite on every pull request. It could be great opportunity to add the coverage to the project and a badge in the readme file.

Show end of game screen

On every played card, we should check if there still are more cards to play. We can create another piece of state to keep this count so we don't have to traverse the whole array cards every time and just compare both array lengths.

If there are no more cards to play: Show an end of game component with a message and a button to play the game again.

Improve Card styled component

By the time, the Card component is using styled-component as well as styles on a separated stylesheet.

The goal of this task is to merge all styles of the Card on the Container styled-component definition inside that the Card.js component file.

Cards should flip

Clicking a card should make it flip, animate it and update its flipped prop.

Add styles to card

  • Cards should scale a little bit on hover or suggest any other cool animation. [DONE]
  • Improve the back background of the card. [DONE]
  • Add a string color to the face front of every pair of cards. Use any cool colors to identify them. At the end of the release, we can decide which images to use. [DONE]
  • Any other cool styling is valid. [DONE]

Improve board UI

I think that deleting paired cards would make the others to move from its place, this should not happen.

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.