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 09:40
In the lab, which of the following displayed a list of all installed services and included a description of the service, the current state, and whether the service started automatically or manually? a. the services manager b. the applications summary c. the recommended services d. list the safe services list
Answers: 2
question
Computers and Technology, 22.06.2019 14:40
For this assignment you have to write a c program that will take an infix expression as input and display the postfix expression of the input. after converting to the postfix expression, the program should evaluate the expression from the postfix and display the result. what should you submit? write all the code in a single file and upload the .c file. compliance with rules: ucf golden rules apply towards this assignment and submission. assignment rules mentioned in syllabus, are also applied in this submission. the ta and instructor can call any students for explaining any part of the code in order to better assess your authorship and for further clarification if needed. problem: we as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). in computer's language, however, it is preferred to have the operators on the right side of the operands, ie. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix write a program that takes an "infix" expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % ( example infix expression: (7-3)/(2+2) postfix expression: 7 3 2 2 result: rubric: 1) if code does not compile in eustis server: 0. 2) checking the balance of the parenthesis: 2 points 3) incorrect postfix expression per test case: -2 points 4) correct postfix but incorrect evaluation per test case: -i points 5) handling single digit inputs: maximum 11 points 6) handling two-digit inputs: 100 percent (if pass all test cases)
Answers: 3
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
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
Questions on the website: 13722367