My approach
- Find ressources online to help me understand all the complexity of this challenge. Discover multiple solutions, selecting the one that I find the most fitting for the challenge and that I understand well and I can adapt (1h)
- Setting up the project and implementing the solution (3h)
- Writing unit tests (30m)
- Writing comments and this documentation (30m)
Architecture
- PokerHand.js contains all the logic to be able to compare poker hands
- PokerHand.test.js has multiple unit tests that checks that the logic is correctly implemented
- main.js is a simple script that let the user input two poker hands and check which one is the best
How to run
- Have Node and npm installed
- Open the folder
/src
in your favorite Terminal - Run
npm install
(we needprompt-sync
andjest
installed) - Run
node main.js
to test the program - Run
npm test
to run unit tests