Sample Output

There are four samples below of input/output for A07.

Return to assignment description

First Sample -- no shuffle, no sort

Simple Card Game ================ This game just deals cards. First game ---------- How many players are in the game? 4 How many cards does each player get? 8 Player 1 gets [AS, AH, AD, AC, 2S, 2H, 2D, 2C] Player 2 gets [3S, 3H, 3D, 3C, 4S, 4H, 4D, 4C] Player 3 gets [5S, 5H, 5D, 5C, 6S, 6H, 6D, 6C] Player 4 gets [7S, 7H, 7D, 7C, 8S, 8H, 8D, 8C] Top card from deck: 9S Second game ----------- How many players are in the game? 10 How many cards does each player get? 13 Player 1 gets [5H, 3D, 10D, KD, 2S, QC, 2C, AC, 7S, 3D, 10H, JD, AS] Player 2 gets [KD, 8H, KS, JH, AS, 7D, 9S, 2D, KC, 2H, 2C, 10S, 5C] Player 3 gets [6D, 4H, QH, 2H, 8H, 6H, 8S, 3C, 3C, 10C, 7H, 5H, 3S] Player 4 gets [4S, 10D, 7D, 4H, 9D, KC, 5S, 9C, JH, 9H, 4C, 9C, 8C] Player 5 gets [6S, 9H, 6H, 6C, JS, 6S, 7H, QD, 8D, 7S, QH, JD, AD] Player 6 gets [3S, 2D, AC, KS, 10C, 5C, AH, 8D, 5D, 4C, 6C, 4D, QS] Player 7 gets [9D, QS, 5S, 5D, 9S, 4S, 8S, JC, JS, 7C, QC, 8C, 10H] Player 8 gets [AD, 7C, 2S, 10S, QD, 3H, AH, KH, JC, 6D, KH, 3H, 4D] Player 9 gets [5H, 3D, 10D, KD, 2S, QC, 2C, AC, 7S, 3D, 10H, JD, AS] Player 10 gets [KD, 8H, KS, JH, AS, 7D, 9S, 2D, KC, 2H, 2C, 10S, 5C]

Second Sample -- shuffle, no sort

Simple Card Game ================ This game just deals cards. First game ---------- How many players are in the game? 4 How many cards does each player get? 8 Player 1 gets [2D, 8C, 2C, 5C, 6H, KS, 10S, 10C] Player 2 gets [4C, KC, 7C, 8H, 9S, 5D, JH, 10H] Player 3 gets [2H, JC, 8D, 5S, JD, 9D, KD, 4H] Player 4 gets [AS, 7D, 3D, QH, 5H, 8S, 6S, QC] Top card from deck: 4D Second game ----------- How many players are in the game? 10 How many cards does each player get? 13 Player 1 gets [2H, 9C, 6C, 5H, 8D, 10C, 3S, 6D, JH, 7H, 5H, 4D, KH] Player 2 gets [JD, 7S, 2D, 8C, 7H, 5S, KD, 8H, QS, 9C, 3S, AS, 3C] Player 3 gets [KH, JC, 7D, 4H, 10H, 5S, KC, 8S, 10C, 9S, KD, 5D, AS] Player 4 gets [JH, 6S, 5C, 8S, 4S, QD, 7C, JS, 10S, AH, 4D, QH, KS] Player 5 gets [8D, 9D, AD, 5C, 4C, JD, 9S, AC, 4C, 3H, 7C, 2S, JC] Player 6 gets [2S, 7D, 9D, 3C, 4S, QC, QC, 10H, 4H, 7S, 10D, 2C, 2C] Player 7 gets [JS, 2H, 5D, 9H, 10S, 3H, QS, 8C, QH, 3D, 6C, 2D, AC] Player 8 gets [6H, 8H, KS, KC, QD, 10D, 6S, 3D, AH, AD, 6D, 9H, 6H] Player 9 gets [2H, 9C, 6C, 5H, 8D, 10C, 3S, 6D, JH, 7H, 5H, 4D, KH] Player 10 gets [JD, 7S, 2D, 8C, 7H, 5S, KD, 8H, QS, 9C, 3S, AS, 3C]

Third Sample -- shuffle, sort (example 1)

Simple Card Game ================ This game just deals cards. First game ---------- How many players are in the game? 4 How many cards does each player get? 8 Player 1 gets [6S, JH, 4D, 4C, 6C, 7C, 9C, QC] Player 2 gets [5S, 7S, 9S, AH, QH, AD, JD, KC] Player 3 gets [8S, 9H, KH, 8D, 9D, AC, 3C, 5C] Player 4 gets [4S, 10S, JS, KS, 2D, 7D, 2C, 8C] Top card from deck: 8H Second game ----------- How many players are in the game? 10 How many cards does each player get? 13 Player 1 gets [AS, 4S, 8S, 9S, 10S, 10S, 7H, 6D, 6D, 10D, KD, AC, 2C] Player 2 gets [3S, JS, KS, 2H, 6H, 7H, 9H, QH, KH, KH, AD, 5D, QC] Player 3 gets [3S, 5S, 7S, 9H, JH, AD, 2D, 3D, JD, QD, 2C, 3C, 7C] Player 4 gets [2S, QS, KS, 3H, 3H, 8H, QH, 7D, 8D, 8D, 9D, QD, AC] Player 5 gets [5S, 8S, QS, 6H, 10H, 4D, 10D, JD, 4C, 8C, 9C, JC, KC] Player 6 gets [6S, JS, AH, AH, 5H, 10H, 3D, 5D, 5C, 6C, 6C, 9C, 10C] Player 7 gets [2S, 7S, 4H, 8H, JH, KD, 3C, 4C, 7C, 8C, JC, QC, KC] Player 8 gets [AS, 4S, 6S, 9S, 2H, 4H, 5H, 2D, 4D, 7D, 9D, 5C, 10C] Player 9 gets [AS, 4S, 8S, 9S, 10S, 10S, 7H, 6D, 6D, 10D, KD, AC, 2C] Player 10 gets [3S, JS, KS, 2H, 6H, 7H, 9H, QH, KH, KH, AD, 5D, QC]

Fourth Sample -- shuffle, sort (example 2)

Simple Card Game ================ This game just deals cards. First game ---------- How many players are in the game? 4 How many cards does each player get? 8 Player 1 gets [6H, 9H, 10H, 7D, 9D, 6C, 10C, KC] Player 2 gets [3S, 10S, QS, JH, AD, 2D, 10D, AC] Player 3 gets [AS, 5S, AH, 7H, 5D, 6D, 3C, 5C] Player 4 gets [4S, 7S, 5H, 4D, 8D, 4C, 8C, 9C] Top card from deck: 4H Second game ----------- How many players are in the game? 10 How many cards does each player get? 13 Player 1 gets [2S, 4S, 8S, 7H, 10H, KH, 2D, 4D, 5D, 6D, AC, AC, QC] Player 2 gets [KS, AH, 3H, 5H, AD, 3D, 4D, 7D, 9D, 6C, 8C, JC, QC] Player 3 gets [10S, KS, 3H, JH, QH, 2D, 10D, JD, JD, QD, 3C, 6C, JC] Player 4 gets [AS, 3S, 5S, 5S, 10S, 4H, 6H, 8H, 3D, 6D, QD, 2C, 10C] Player 5 gets [AS, 3S, 6S, 9S, AH, 2H, JH, KD, 2C, 4C, 5C, 7C, 7C] Player 6 gets [2S, 4S, 9S, JS, 4H, 8H, 9H, KH, 5D, 9D, 10D, 8C, KC] Player 7 gets [8S, JS, QS, 2H, 5H, 6H, 10H, AD, 8D, KD, 3C, 4C, 9C] Player 8 gets [6S, 7S, 7S, QS, 7H, 9H, QH, 7D, 8D, 5C, 9C, 10C, KC] Player 9 gets [2S, 4S, 8S, 7H, 10H, KH, 2D, 4D, 5D, 6D, AC, AC, QC] Player 10 gets [KS, AH, 3H, 5H, AD, 3D, 4D, 7D, 9D, 6C, 8C, JC, QC]

Return to assignment description