CoderanchCorral / Blackjack

Mozilla Public License 2.0
17 stars 2 forks source link

Updated Card.java needs testing #2

Closed smcdonald4812 closed 5 years ago

smcdonald4812 commented 5 years ago

Added getters and constructors for this class, as well as boolean isAce for determining secondary value and rankValue based on ordinals. I did the coding here in GitHub, I'm not sure how to do the JUnit testing. Would someone be able to instruct me on how to do it?

smcdonald4812 commented 5 years ago

Fixed a couple dumb mistakes I made. Just saw your review and your edit @chiquito83, thanks for the fixes. I'm new at this, it's up to you guys how you want to do it. It's up to you guys if you want to get rid of the values, ordinals, and logic. I figured by only having getters and not setters the card can't be changed after construction. I added the logic because I thought calls like getRankValue() and getSecondaryValue() might make it easier inside a deck or table class, and this way the card's values can't be changed after it's created.