RLittlesII/IDeclareWar

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

★ 0Forks 0C#GitHub ↗Compare

README

card-game-war

dotnet implementation

Took the important bits from wonderland-clojure-katas

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.

Goals

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

Contributors

RLittlesII

Issues