/21-card-trick

21 Card Trick Implementation with vuejs, angular and pure javascript

Primary LanguageTypeScriptMIT LicenseMIT

21 Card Trick

Author Software License

The trick consists of arranging a deck of 21 cards into three piles of seven cards each, the user should be asked to pick a card and tell the pile on which the chosen card is contained. You should now rearrange the cards into three new piles, always keeping the pile that was appointed by the user in the middle of the other two. This process is repeated two more times (making a total of 3 rounds), after that, if the piles were correctly arranged in every round, the card that was picked by the user, in the beginning, will be placed in the middle of the deck (11th card).

Here are some resources explaining with more details how the trick works:

Implementation

The project have the same implementation with different technologies. The game works on desktop and mobile.

  • Angular: All instructions to build and run the angular implementation are on the README.md of the angular folder.

  • Vue: All instructions to build and run the vue implementation are on the README.md of the vue folder.

  • Vanilla: All instructions to build and run the vanilla implementation are on the README.md of the vanilla folder.

Initial Game Screen

a

Playing Screen

a

Game End Screen

a