This is my technical assignment on the Middle Frontend developer offer on 'Poker' theme. Interpretation of the theme came out, maybe, not quite accurate, but whatever. In the end, I even overdid all tasks in it.
- Clicking the button should generate two random hands with cards in memory (console.log).
- Clicking the button should render two random hands on the page as cards.
- Determine the winning hand by its number of pairs, add class="winning" to hand.
- Determine winning pairs and add class="pair0" (or "pair1" for 2nd pair) to cards.
- [Extra Credit] Ensure that 90% of hands have at least one pair
All main logic is contained inside 'usePoker', 'useCombinations' and 'useRank' hooks. Made with React/Typescript and Styled Components.
This project is not optimized for mobile devices yet.
@ 2020