careercup / CtCI-6th-Edition

Cracking the Coding Interview 6th Ed. Solutions
11.33k stars 4.41k forks source link

Bug in isBlackJack() method in BlackJackHand.java #245

Open LeonCai1 opened 1 year ago

LeonCai1 commented 1 year ago

in isBlackJack() method, the code only checks for Aces and face cards. 10 and Ace should also be valid blackjack. I think the return statement should be: return (first.isAce() && second.value()==10)||(first.value()==10&& second.isAce());