public class SimpleGinRummyPlayer
Implements a random dummy Gin Rummy player that has the following trivial, poor play policy:
Ignore opponent actions and cards no longer in play.
Draw face up card only if it becomes part of a meld. Draw face down card otherwise.
Discard a highest ranking unmelded card without regard to breaking up pairs, etc.
Knock as early as possible.
Report that the given player has drawn a given card and, if known, what the card is.
If the card is unknown because it is drawn from the face-down draw pile, the drawnCard is null.
Note that a player that returns false for willDrawFaceUpCard will learn of their face-down draw from this method.
At the end of each turn, this method is called and the player that cannot (or will not) end the round will return a null value.
However, the first player to "knock" (that is, end the round), and then their opponent, will return an ArrayList of ArrayLists of melded cards.
All other cards are counted as "deadwood", unless they can be laid off (added to) the knocking player's melds.
When final melds have been reported for the other player, a player should return their final melds for the round.