- You have a deck of cards:
const ranks: string[] = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King'];
const suits: string[] = ['Hearts', 'Diamonds', 'Clubs', 'Spades'];
- Each of two players should have random 26 cards from the deck (total 52)
- Each round players show one card from the top of the deck
- Player with the highest card - wins and takes both cards and puts them into his deck bottom
- Player that collects all the cards - wins
You can try out the game here: https://technoph1le.github.io/card-game/
- For building the website: React.js + TypeScript
- For state management: MobX
- For smooth animation: Motion (formerly "Framer Motion")
P.S. The legacy code can be found in /script.ts
file.