andrewprock / pokerstove

poker evaluation and enumeration software
BSD 3-Clause "New" or "Revised" License
804 stars 350 forks source link

Add possibility to create Suits from chars #36

Closed jdoerrie closed 6 years ago

jdoerrie commented 7 years ago

This change fixes #35 by adding the possibility to create Suits from the characters "cdhsCDHS" by adding a call to suit_code when necessary. This mirrors the functionality of Rank, where for example it is also possible to create the Rank RANK_TWO by passing the character '2' to the constructor. An appropriate test is included.