Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rlittlesii/ideclarewar

a .NET implementation of a closure code kata https://github.com/gigasquid/wonderland-clojure-katas/tree/master/card-game-war
https://github.com/rlittlesii/ideclarewar

Last synced: about 2 months ago
JSON representation

a .NET implementation of a closure code kata https://github.com/gigasquid/wonderland-clojure-katas/tree/master/card-game-war

Awesome Lists containing this project

README

        

# card-game-war

## dotnet implementation

Took the important bits from [wonderland-clojure-katas](https://github.com/gigasquid/wonderland-clojure-katas/tree/master/card-game-war)

This kata is a version of the classic card game [War](http://en.wikipedia.org/wiki/War_%28card_game%29).

![Cards Painting](./image/cards.painting.png)

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](scenario.md)

## 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.

* 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!

## License

Copyright © 2014 Carin Meier

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

## Goals

1. Read Requirements and translate them to acceptance criteria
2. Practice Behavior Driven Development
1. SOLID
2. Encapsulation
3. Test Driven