Memory (also known as Concentration) is a card game played with one or more players. Using a standard card deck (including both jokers) the players shuffle the deck and lay all of the cards face down on a surface and two cards are flipped face up over each turn. The object of the game is to turn over pairs of matching cards. Concentration can be played with any number of players or as solitaire. Wikipedia has a good description of the game.
Your challenge is to build Memory in the browser with the requirements below.
Please don't fork this repository
Because this repository is public, all of it's forks are public. Instead, please follow the instructions below:
- Clone this repository to your machine
- Create a new private repository on your github account
- Change the remote of the local repository to your new remote
- Push code to that remote
- Develop
- Add github user
znicholasbrown
as a collaborator to your private repository
- Fetch the Deck from the GraphQL server
- Shuffle the deck
- Display all 54 cards (jokers included) face down
- Clicking the back of a card should turn a card over
- Player can turn over 2 cards at a time
- When two cards are turned over:
- if the number and color of the cards match, the player collects the pair and the cards are removed from the board
- if the cards do not match, they turn back over and remain in position
- When a player has found all 27 pairs, the player should see a success message
- One player can play one entire game
- Sensible tests (see @vue/test-utils)
- Clear commit messages & history
- Well-styled & readible cards
- Responsive (Fully Mobile & Tablet Friendly)
- Animations for card flips
- Snapshot tests
- Shuffle the deck before returning it from the server
- Reset Button that starts an in-progess game over from the beginning
- Track the score
- Multiple player support
This repository includes an Apollo GraphQL server. Much of the code that implements this server is located in dependencies. This is because we've done the work to set up the server for you already, and there's only one function you should need to alter to fulfil a bonus requirement. If you're unfamiliar with GraphQL, you should be able to get started after a brief study of the Vue-Apollo Docs and the GraphQL docs. The endpoint for the server is located at http://localhost:4000/graphql
.
nvm install
nvm use
npm install
npm run serve
npm run apollo
npm run build
npm run test
npm run lint
npm run test:unit