Simple card game

Using the @Card@, @Deck@, and @Hand@ class definitions, write a @Player@
class, a @Game@ class, and a program to play a simple card game with any
number of players.

In this simple card game, each of the players draws a card from a
shuffled deck. Whoever has the highest card wins. Cards are compared
first by suit, then by rank. Spades beat Hearts, which beat Diamonds,
which in turn beat Clubs. Within a same suit, King beat Queen, which in
turn beat Jack, which beat 10 down through 2, which beat Ace.

Input

The input consist of a positive integer @n@, the number of players,
followed by a shuffled deck of cards.

Output

For each player, print the card drawn by the player, followed by the
winner of the game.

Precondition

The number of cards in the shuffled deck is not less than the number of
players.

Problem information

Author: Gabriel Valiente

Generation: 2026-01-25T15:31:16.231Z

© Jutge.org, 2006–2026.
https://jutge.org
