Please follow the teacher requirement. that's the only way to get full credit
Instructions: The game company, Silly Little Games, has come up with a new card game for you to simulate. It uses a special set of cards that contain the numbers 1 to 13 and there are four copies of each card in the deck (if you want to try out this game with a regular card deck, you can make Ace = 1, Jack = 11, Queen = 12, King = 13). The first person to play all the cards in their hand wins. The game is played as follows: 1. The cards are shuffled and placed into a stack 2. Each player is dealt 7 cards from the stack in a round-robin fashion and their cards are placed into their queue 3. The next card in the deal stack is placed into the discard stack 4. For their turn, each player plays the next card in his/her queue. · If the card the player plays is HIGHER in number than the one on the top of the discard stack, the player's turn is over. · If the card the player plays is EQUAL in number to the one on the top of the discard stack, the player must then take one card from the deal stack and the player's turn is over. · If the player's card is LOWER in number than the one on the discard stack, the player must take two cards from the deal stack and the player's turn is over. 5. If the deal stack runs out of cards, "turn over" the discard stack and continue the game. · Note that you must keep the same card on the top of the discard stack, so you will need to hold onto that card and push it back onto the discard stack before continuing the game. 6. The first player to run out of cards wins the game. 7. Offer to repeat the game as many times as desired. Class Requirements 1. Create a generic version of Stack and Queue classes. 2. All of the output to the screen and reading from the keyboard is to be done in the SillyCardGame class. This class has the main method that we'll use to start the game. Only unexpected error messages are allowed to be displayed on the screen from other classes. (Or you can throw exceptions.) 3. All of the game logic should be in the GameModel class. Notes: · There are only two players. · You may ask for names or simply call them by whatever names your game chooses. · Remember to design your user interface carefully. · You must use a stack for the shuffled cards, a stack for the discard pile, and a queue for each player - all of type integer. · This shuffle routine may be helpful: · /** · * Shuffles the cards using the Fisher-Yates algorithm (Links to an external site.) · * @param cards deck to shuffle · */ · private void shuffleDeck(ArrayList cards) { · Random rand = new Random(); · for (int i = cards.size(); i > 1; i--) { · int j = rand.nextInt(i); · int temp = cards.get(i - 1); · cards.set(i - 1, cards.get(j)); · cards.set(j, temp); · } } Naming: · Package name: yourSUusername_p3 · File name(s): GameModel.java, Queue.java, SillyCardGame.java, and Stack.java Sample output: · See P3: sample output Submission: See Documentation & Style Standards To submit, go to the CPSC 5002 course in Canvas. Click on the Assignments menu and click on P3: Card Game. Click on the "Submit Assignment" button and submit a single ZIP file. Your ZIP file should be the same name as your package name, with a .zip extension. Rubric P3: Card Game P3: Card Game Criteria Ratings Pts This criterion is linked to a Learning OutcomeEach new game is set up properly Cards numbered 1 to 13, with 4 copies of each are shuffled and placed in a deal stack. Cards are dealt to players in round-robin fashion. (1 card to P1, 1 card to P2, 1 card to P1, 1 card to P2, etc..) A single card is placed in the discard stack. 10 pts This criterion is linked to a Learning OutcomeGame is played correctly Each player plays one card per turn, taking additional cards as specified by the rules. When the deal stack runs out of cards, it is properly refilled using the discard stack. (Do not shuffle the discard stack) First player to play all cards in hand wins. Game is able to be repeated as many times as needed 20 pts This criterion is linked to a Learning OutcomeGood class and method design Each class has a central purpose that is reflected in the documentation Exactly 4 classes are implemented and submitted: Stack , Queue , SillyCardGame , GameModel ALL of the printing to the console and reading from the keyboard is performed only in SillyCardGame class All of the game logic is in GameModel class Methods are designed to do one and one thing only The length of the method is determined by the logic, rather than by an arbitrary length 20 pts This criterion is linked to a Learning OutcomeStack and Queue classes used appropriately Generic versions of Stack and Queue classes are used. No new methods are introduced into these classes. Stacks are used for the deal and discard card piles Queues are used for the player's current hand cards 20 pts This criterion is linked to a Learning OutcomeProper choice of repetition and decision statements and these are well-designed If/while/for/switch are used as needed and in the appropriate manner. This includes proper choice of statement as well a proper conditions written. 10 pts This criterion is linked to a Learning OutcomeProper formatting and documentation Guidelines in Documentation & Style Standards are followed 15 pts This criterion is linked to a Learning OutcomeWell-designed user interface Welcome and goodbye messages are present. User interface is clear and readable. Ask for the item wanted and receive on the same line. New lines are used to ensure that output does not exceed 80 cols. 5 pts Total Points: 100