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.