Two Player Card Game:

  • the game starts with a deck of cards
  • the cards are dealt out to both players
  • on each turn:
    • both players turn over their top-most card
    • the player with the higher valued card takes the cards and puts them in their scoring pile (scoring 1 point per card)
  • this continues until the players have no cards left
  • the player with the highest score wins

Assumptions:

  • this is a poker card game
  • jokers are removed before the game
  • suits does not matter

To run:

  • npm install
  • npm test

Reference: