Skip to content

dmgithub16/PlayingCards

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playing Cards in Java

As part of a larger project of making apps that deal with playing cards (Cribbage scores, Poker probabilities, etc.), I've decided to create an open source library for dealing with playing cards and collections of playing cards.

The types I've defined are:

Deck (class)

  • has many Cards
  • can iterate over the Cards by Rank
  • can iterate over the Cards by Suit
  • can render itself to a String

Card (class)

  • has a Rank
  • has a Suit
  • can render itself to a String

Rank (enum)

  • has an int index
  • can render itself to a String

Suit (enum)

  • can render itself to a String
  • can 'pretty' render itself to a String with fancy UTF-8 characters such as ♣

CribbageCalculator

  • takes in a deck and calculates a score
  • returns the score
  • returns the collection of score descriptions

To Do

all 52 cards

About

Playing Cards in Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%