Giter Club home page Giter Club logo

card_wars's Introduction

Card Wars

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.

Tom & Mary are playing war

  • Turn 1 Tom plays a 4:clubs: Mary Plays a 8:spades: Mary get both cards, they go to the bottom of their pile
  • Turn 2 Tom plays a A:spades: Mary Plays a K:spades: Tom get both cards, they go to the bottom of their pile
  • Turn 3 Tom plays a 6:spades: Mary Plays a 6♢ Both players add the next 3 cards to the war Tom plays a 8♢ Mary Plays a 9♡ Mary get all 10 cards, they go to the bottom of their pile

card_wars's People

Contributors

kamran102 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.