Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.21 KB

readme.md

File metadata and controls

61 lines (37 loc) · 1.21 KB

Psychic Poker Player

NodeJS app which calculates the best Poker hand from the given hand of 5 cards and from the next 5 cards in the deck which were revealed by the magic psychic ability

Getting Started

Git clone or download the repo. Install the dependencies. Replace the data in the input file. Run node app.js. Enjoy the magic.

Input Format and Encoding

Sample input: TH JH QC QD QS QH KH AH 2S 6S

This means that: Hand: TH JH QC QD QS Deck: QH KH AH 2S 6S

The first character is the face-value (A=Ace, 2-9, T=10, J=Jack, Q=Queen, K=King) and the second character is the suit (C=Clubs, D=Diamonds, H=Hearts, S=Spades)

Prerequisites

NodeJS should be installed on your system

Installing

Clone or download the repo

git clone https://github.com/AndreyGalchevski/psychic-poker-player.git

Install the dependencies

npm install

Running the tests

Replace the data in the input.txt in the input folder with your own data and run the following command in the terminal

node app.js

The results will be in output.txt inside the output folder

Built With

  • JavaScript
  • NodeJS
  • Lodash

Authors

  • Andrey Galchevski

License

This project is licensed under the MIT License