You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This requires either card1 and card2 to be passed into largeHand (or handscore). By passing isBlackjack, one obfuscates the cards and a "split" cannot be determined as it exists only where either a handscore of 22 or parsing of card1 and card2.
This is the particular test that should be failing for everyone if they code it correctly:
@Test
public void firstTurnWithAceAceAndDealerAce () {
assertThat(blackjack.firstTurn("ace", "ace", "ace")).isEqualTo("P");
This is the method stub in question:
public String largeHand(boolean isBlackjack, int dealerScore) {
throw new UnsupportedOperationException("Please implement the Blackjack.largeHand method");
}
The particular instruction:
Category: Large Hand
If you have a pair of aces you must always split them.
If you have a Blackjack (two cards that sum up to a value of 21), and the dealer does not have an ace, a figure or a ten then you automatically win. If the dealer does have any of those cards then you'll have to stand and wait for the reveal of the other card.
This can obviously be modified but this is an early track exercise so that should probably not be expected of what might be a 1st time programmer's 6th or 7th exercise on your site.
The text was updated successfully, but these errors were encountered:
I agree that the instruction for this exercise (as well as the stub implementation) is a bit clunky. I remember struggling to understand what I was meant to do myself.
However:
a "split" cannot be determined as it exists only where either a handscore of 22 or parsing of card1 and card2.
If you read the instructions carefully, it says (emphasis mine):
Implement the decision logic for hand scores larger than 20 points.
Implement a function that returns the string representation of a decision given your cards. This function is only called if the handScore is larger than 20. It will receive 2 arguments: isBlackJack and dealerScore. It should implement the bulletpoints in the category "Large Hand" above.
So that means that it will be called in two cases: when handScore == 21 (in this case isBlackjack == true) or when handScore == 22 (in this case isBlackJack == false)...
Again, I agree that this is far from intuitive and it's probably too complex for a student at this point in their learning journey.
This requires either card1 and card2 to be passed into largeHand (or handscore). By passing isBlackjack, one obfuscates the cards and a "split" cannot be determined as it exists only where either a handscore of 22 or parsing of card1 and card2.
This is the particular test that should be failing for everyone if they code it correctly:
This is the method stub in question:
The particular instruction:
This can obviously be modified but this is an early track exercise so that should probably not be expected of what might be a 1st time programmer's 6th or 7th exercise on your site.
The text was updated successfully, but these errors were encountered: