The players then play their cards in the first phase of scoring for "pegging points". Once everyone has added cards to the kitty, a community card is cut from the deck for later use by all the players in scoring their hands. Each of the players is dealt 6 cards, and must contribute two cards to a secret hand (sometimes called the "kitty" or the "crib"), later scored by the dealer. Very briefly, it is a card game played between two or three people (for simplicity, I'll only consider two-player games here). The GameĪn excellent overview of the game can be found here, so I won't go too far into the details. I'll show you how to write a library to score a cribbage hand, and share a couple of the challenges along the way. After Googling for existing scoring algorithms and not finding any, I set about writing my own. There are many interesting problems associated with that goal, but one of the core requirements would be a way to score a hand. Since MSN games removed multi-player cribbage from their list of online games, I've been interested in writing my own.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |