subject

Write fairly complete pseudocode for the Fish Wars card game. Fish Wars is a card game where two players get 13 cards each. The cards have face values of 1-10 plus one shark card and two peace cards.

The game is played in 13 rounds. Each round, the players each play one card face down and then flip them up at the same time. The player with the higher number (plus any battle bonus) wins. No one wins on a tie. A round winner gets one point added to their score plus one battle bonus point. Play continues until all thirteen rounds are complete and the highest final score wins.

Play exception. If you play a shark card then you always win unless the opponent plays a peace card then it is a tie and no one wins. If you play a point card or a shark card against a peace card then it is a draw plus the player who did not play the peace card has their battle bonus reduced to zero. If two peace cards are played then it is just a tie.

Your job is to write a program that simulates the Fish Wars game between a human player and an AI opponent. To start, the AI opponent can just randomly select a card. Have the program do all scoring and keep track of the battle bonus. Also make it so that the player can play the game again at the end if they want to do so.

Example of Play:

Round 1: 5 vs. 6 - Player 2 wins! Score 0 : 1 (BB: 1)
Round 2: 3 vs. 2 (+1 BB) - Draw! Score 0 : 1 (BB: 1)
Round 3: Shark vs. 7 (+1 BB) - Player 1 wins! Score 1 (BB: 1) - 1 (BB: 1)
Round 4: Peace (+1 BB) vs 5 (+1 BB) - Draw- Player 2 BB reduced to 0; Score 1(BB: 1) - 1 (BB: 0)
Round 5: 2 (+1 BB) vs. Shark - Player 2 wins! Score 1(BB: 1) - 2 (BB: 1)

For this program, do not use classes and objects plus use standard C++ code and the entire code must be in one file with at most three functions.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
Which of the following methods could be considered a “best practice” in terms of informing respondents how their answers to an on-line survey about personal information will be protected? respondents are informed that investigators will try to keep their participation confidential; however, confidentiality cannot be assured. respondents are informed that a research assistant will transfer all the research data to a password-protected computer that is not connected to the internet, via a usb flashdrive. the computer is located in a research team member’s office. the investigator uses the informed consent process to explain her institution’s method for guaranteeing absolute confidentiality of research data. the investigator uses the informed consent process to explain how respondent data will be transmitted from the website to his encrypted database without ever recording respondents’ ip addresses, but explains that on the internet confidentiality cannot be absolutely guaranteed.
Answers: 1
question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
You know the right answer?
Write fairly complete pseudocode for the Fish Wars card game. Fish Wars is a card game where two pla...
Questions
question
English, 23.03.2020 01:42
question
Mathematics, 23.03.2020 01:43
question
Mathematics, 23.03.2020 01:43
question
German, 23.03.2020 01:43
question
Social Studies, 23.03.2020 01:44
Questions on the website: 13722367