Assignment 2

Implement the following card game. The game is played with 52 cards, each card has one of four suits (which are irrelevant to the game) and one of 13 sizes (2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A, in increasing order). Each player gets six random cards. The game consists of five tricks. For a trick, each player plays exactly one card. The players play the cards in a trick sequentially. The player starting the trick may play arbitrary card. Subsequent players must play a card greater or equal in size than the largest card in the trick or play their lowest card (minimal). The player who played the biggest card wins the trick, if more than one player played the biggest card, the last player that played such card wins the trick. The player that wins a trick starts the next one. At the end each player has exactly one card. The player(s) with lowest remaining card wins.

Scoring (not a part of the assignment): The player with lowest card gets 0 points. The players with higher cards get points according to the difference of their card and the lowest card. E.g. id the lowest card is 6 and somebody has J left, he gets 5 points. first player to get more than 21 points loses and the game ends.

I prepared a basic design. Although, the design divides the responsibilities quite well, the classes are too coupled (and the design is not complete, e.g. you do not have constructors in the design). To reduce coupling you want to put some interfaces in-between the classes and use some dependency injection. You may modify the design if you wish, e.g. it still makes sense to split some classes.
Implement the classes as follows.

Send your solution to lukotka.pts@gmail.com. The first deadline is 10.4.2021 23:59:59. The deadline for reviewed solution is 17.4.2021 23:59:59. The solutions sent later will be accepted, however the number of points awarded may be reduced.