Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP 4004 Individual Assignment 3

2022

You are to design, code and test a web-based implementation of the game Crazy Eights for 3 and 4 players. You must develop your code incrementally using Github, IntelliJ, Maven and Websockets. Do adopt the same guidelines as for assignment 1with respect to naming commits. We expect but will not strictly enforce TDD. We will however penalize large commits, except for refactorings. You should have clients that merely receive messages from the server and send back player input when relevant. You must test your code using Selenium 4.1.4.

While you can use Websockets with javascript, a bonus of 15 points will be given to those who instead use Spring (or Spring Boot). In other words, if your game uses Spring/Boot and runs correctly in normal (ie random play) and passes all my acceptance test cases, you will score 115 out of 100 for this assignment. If you do not use Spring, your maximal grade is 100.

Description of the basic card game:

(also watch https://www.youtube.com/watch?v=iDQjn3k76Mw)

The game consists of several rounds, each round concluding by computing the score of each player for that round and updating their game scores accordingly (so that everyone sees everyone’s scores). In a round, five cards are initially dealt to each player. The remaining cards of the deck are placed face down at the center of the table as the stock pile. The top card of this stock pile is then turned face up to start the game as the first card in the discard pile. This top card cannot be an 8 and, if this is the case, that 8 is put back randomly in the deck and a new top card is picked.

In a round, on her turn, a player discards a card by matching rank or suit with the top card of the discard pile. Alternatively, a player can play any 8, which allows that player to then select the suit that the next player is to play. That next player must then match the named suit or play another 8.

If a player is unable to play, that player draws, one at a time, up to 3 cards from the stock pile. A card that is drawn and can be played must be played (after which that turn ends). If still unable to play after drawing 3 cards, that player ends her turn.

A round is over as soon as one player plays their last card. In this case, that player scores 0 for the round. Each other player scores the total value of the cards in their hand as follows: an 8 is worth 50 points, kings, queens and jacks are worth 10 points, and all other cards are worth their face value. The scores for the current round are added to those of the previous rounds. The game is over once any of the players reaches 100 points. The winner is the player with the lowest score once the game is over. All players must be notified about who is the winner.

Alternatively, a round is over once the stock pile is exhausted and no player can play another card. That is, even if the stock pile is exhausted, players continue their turns until no player can play another card. In this case, all players score the total value of the cards in their hand.

Additional Special Behavior Cards:

a) Queens

Playing a Queen causes the next player to miss their turn.

b) Aces

Playing an Ace reverses the direction of play (i.e., modifies who is the next player to play).

c) Twos

Playing a Two forces the next player to draw two cards, unless they can immediately play two cards.

Order of players’ turns in a round:

The order in which the players join a game determines their initial sequence of play. That is, the first player to have joined plays first in the first round, followed by the second player to have joined, etc. In the second round, it is the second player to have joined the game who starts that second round, followed by the third player to have joined, etc.

Assignment Requirements:

Your game’s textual web-based interface must allow each player to see their cards, the number of cards remaining in the stock pile, the top card of the discard pile, and the score of all players. Your interface must also indicate whose turn it is, and, once a player’s turn ends, who is the next player to play. Finally, at the end of the game, the winner must be identified in each player’s UI.

You are to use a textual interface, with S for spades, C for Clubs, D for diamonds and H for hearts. So 8H refers to the eight of hearts.

You are to make a video that shows you downloading the game, running my acceptance test suite, and then playing a round of the game with 4 players and random cards.

Do create and invite the TAs and myself to your new repo for A3. Submit a properly-named filled grid to Brightspace.