Skip to content

snelsi/poker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App shot

Poker Game

https://poker.snelsi.now.sh/

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.

Tasks:

  1. Clicking the button should generate two random hands with cards in memory (console.log).
  2. Clicking the button should render two random hands on the page as cards.
  3. Determine the winning hand by its number of pairs, add class="winning" to hand.
  4. Determine winning pairs and add class="pair0" (or "pair1" for 2nd pair) to cards.
  5. [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