Skip to content

Latest commit

 

History

History

card-game-war

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

card-game-war

This kata is a version of the classic card game War.

Cards Painting

The rules of this card game are quite simple.

  • There are two players.
  • The cards are all dealt equally to each player.
  • Each round, player 1 lays a card down face up at the same time that player 2 lays a card down face up. Whoever has the highest value card, wins both round and takes both cards.
  • The winning cards are added to the bottom of the winners deck.
  • Aces are high.
  • If both cards are of equal value - three cards are dealt from each hand face down and then 1 more face up to war again. the winner takes all the cards. If this ties repeat the process again.
  • The player that runs out of cards loses.

If you are stuck, you might want to sneak a peak at this sample scenario

Instructions

  • Clone or fork this repo
  • cd card-game-war
  • Run the tests with clj -X:test
  • In this kata, you will be prompted to fill in your own tests.
  • Make the tests pass!

Solutions

Once you have your kata solution, you are welcome to submit a link to your repo to share here in this section with others.

If you haven't solved your kata yet - Don't Peek!

License

Copyright © 2014 Carin Meier

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.