dhonig / cardgame Goto Github PK
View Code? Open in Web Editor NEWcardgame kata
cardgame kata
All parts of the problem set should be done, including the bonus rounds.
Write a program that will create a deck of standard playing cards (52 cards), shuffle them, and deal them out to a set of players. There are 2 parameters required for the game: numbers of players, number of cards to deal to each player. Default number of cards to deal each player is 5. Dealing should be done in a round-robin manner.
A standard deck of cards has 14 card ranks in 4 suits. Card ranks are 2-10, J, Q, K, A. Values of those cards for ranking purposes in 2-10, 11, 12, 13, 14. Hands can be compared by the sum of the value of the cards. The best hand possible is AAAAK (69 points). The worst hand is 22223 (11 points). J8765 (37) beats 98765 (35).
Bonus 1: Add a parameter for number of rounds to play to determine an overall game winner.
Bonus 2: After being dealt a hand, each player can choose to trade in all but 2 cards and receive replacement cards. This can only be done once. After each player has had the opportunity to trade in cards the round is finished and a winner for the round determined.
Bonus 3: Configure each player with different strategies to determine which one is better over a set of rounds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.