Took the important bits from wonderland-clojure-katas
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-warwa
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.
- Read Requirements and translate them to acceptance criteria
- Practice Behavior Driven Development
- SOLID
- Encapsulation
- Test Driven
