This kata is a version of the classic card game War.
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
- 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!
Once you have your kata solution, you are welcome to submit a link to your repo to share here in this section with others.
- https://github.com/aaronj1335/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/gensym/wonderland-clojure-katas/tree/card-game-war-solution/card-game-war
- https://github.com/vincentjames501/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/werand/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/yzernik/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/priort/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/bradlucas/wonderland-clojure-katas/tree/card-game/card-game-war
- https://github.com/harshita/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/davidpham87/wonderland-clojure-katas/tree/my-training/card-game-war
- https://github.com/ultrakapy/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/metamorph/wonderland-clojure-katas/tree/card-game-war/card-game-war
- https://github.com/JustinSpedding/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/RokLenarcic/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/kimsnj/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/whiteotter/wonderland-clojure-katas/tree/card-game-war/card-game-war
- https://github.com/saicheong/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/fachammer/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/darrell-pittman/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/aquaraga/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/zelark/wonderland-clojure-katas/tree/solution/card-game-war
- https://github.com/LucianaMarques/wonderland-clojure-katas/tree/luciana-card-game-war
- https://github.com/raydel95/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/manuel-colmenero/wonderland-clojure-katas/tree/master/card-game-war
- https://github.com/kuchichan/wonderland-clojure-katas/tree/master/card-game-war
If you haven't solved your kata yet - Don't Peek!
Copyright © 2014 Carin Meier
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.