![jamarishayw](/avatars/47106.jpg)
jamarishayw
19.02.2020 •
Computers and Technology
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.
Solved
Show answers
More tips
- F Food and Cooking Learn How to Make Ice Cream at Home - Step by Step Guide...
- H Health and Medicine When can it be said that a person has a normal pulse?...
- A Art and Culture When Will Eurovision 2011 Take Place?...
- S Style and Beauty How to Choose the Perfect Hair Straightener?...
- F Family and Home Why Having Pets at Home is Good for Your Health...
- H Health and Medicine How to perform artificial respiration?...
- H Health and Medicine 10 Tips for Avoiding Vitamin Deficiency...
- F Food and Cooking How to Properly Cook Buckwheat?...
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- L Leisure and Entertainment Carving: History and Techniques for Creating Vegetable and Fruit Decorations...
Answers on questions: Computers and Technology
- C Computers and Technology A stack data structure, when implemented by a programmer as a LIFO data structure, has the following property (only one correct choice): [Assume there are several items remaining...
- C Computers and Technology If wire rope guard rails are used what must also be done?...
- C Computers and Technology Import java.util.collection; import java.util.iterator; /** * counts the number of positive values in a collection. * * @author dean hendrix ([email protected]) * @version 2017-09-28...
- S Social Studies A group contingency that establishes individual avoidance of certain events is a A. social avoidance B. cultural taboo C. social pressure D. none of the above...
- B Business Business ethics chapter 4 Henry Ford II recognized the fact that corporations operate in an isolated environment true false...
- M Mathematics Given f(x)=2x-3 and g(x)=3x+1 what is an equation for f(g(x)?...
- E English Drag each sentence to the correct location. Match each example to the correct type of conflict....
- B Biology The phrase eating like a bird” is often used to express that someone only eats a small amount of food. Explain in detail why this saying is inaccurate....
- C Chemistry A 10.0 % (m/m) solution of potassium chloride, KCl dissolved in water has a density of 1.06 g/mL. What is the molar concentration of this aqueous solution? Molar Mass (KCl) = 74.55...
- M Mathematics X2-X, 2--6-8 Identify the slope of the line parallel and perpendicu y=- x+3 Parallel: Perpendicular: Trite the equation of the line in slope-intercept f What is the answer...
Ответ:
A digital footprint is a trail of data you create while using the Internet. It includes the websites you visit, emails you send, and information you submit to online services. A "passive digital footprint" is a data trail you unintentionally leave online.
Explanation: