Question
Crazy Eights What to do: Setup: In this java programming assignment you will build a 2-player version of the Crazy Eights game. You have to
Crazy Eights
What to do:
Setup:
In this java programming assignment you will build a 2-player version of the Crazy Eights game. You have to simulate a game between two computer players. The user will not play in the game.The initial deck will consist of 52 card and should be represented using a circular array queue. To start the game, play the first card from the deck(you have to shuffle it first) as the current card. At each subsequent turn following the initial one, a player has three options:
1. Play a card with the same suite as the previous card.
2. Play a card with the same rank as the previous card.
3. Play an eight and set the current card to the most favorable card suite and rank to the current player.
4. If a player can't place any cards, then it should draw from the deck until it can place one.
In your simulation, you should show the state of the game at each turn. You should at least show:
1. The size of the deck
2. The current card at play
3. The hands of both players
4. The card placed at each turn
Once a player has an empty hand, it wins the game.
Requirements:
1. You should at least have three classes: deck, player, and card to complete this assignment.
2. Make sure to shuffle the deck when a game is started.
3. The card class has value and suite fields.
4. The deck class is implemented as circular queue array.
5. The player class is implemented as a linked list of cards.
6. Print a trace of the game.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started