Question: Write a code for GoFish game with four classes as Main.java, Game.java, Groupofcards.java, player.java and Tester Class. Please help me on this. Thanks Go Fish

Write a code for GoFish game with four classes as Main.java, Game.java, Groupofcards.java, player.java and Tester Class.

Please help me on this.

Thanks

Go Fish rules will be explained based on a standard 52-card deck. The goal of the game is to collect the most sets of four.

Go Fish can be played with anywhere from 2-4 players. Each player is dealt 5 cards (if only 2 players are playing, deal 7 cards each). The remaining cards should be placed face down. This creates a draw pile.

Pick a card number from the ones you hold in your hand. Then, choose another player and ask if they have the given card number. For example: Do you have any 3s? If that person has one or more of the called card, they are given to you and become part of your hand. Anytime you get cards from another player, you may repeat this process.

If your opponent does not have the card number you asked for, they will say Go Fish. At this point, you draw a card from the draw pile. If the card you draw matches the card number you asked your opponent for, show the card to your opponents, put it in your hand, and continue playing your turn. If the card does not match the card number you asked for, the card becomes part of your hand, and it is your opponents turn.

As soon as you have a set of 4 cards of the same number in your hand (one of each suit), you immediately place these cards face up on the table.

The game ends when one person lays all their cards on the table, or the draw pile is empty, whichever comes first. The person with the most sets of four wins the game.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!