Question
using BlueJ In the exotic draw poker variation of badugi , the players try to draw a four-card hand in which no two cards have
using BlueJ
In the exotic draw poker variation of badugi, the players try to draw a four-card hand in which no two cards have the same suit or rank. Write a method boolean hasFourCardBadugi(String hand) that checks whether the given four-card hand is a badugi, that is, all four ranks are different, and all four suits are different. For example, given the hand "2d7cKhJs" this method would return true, but given the hands "4d4cKhJs" (that has two fours) or "2d7cKhJd" (that has two diamonds), the method would return false. (Your method needs to make exactly 12 equality comparisons in total, when you compare the rank and the suit of each card to the rank and the suit of every other card that follows it.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started