Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++) Write a program with only C++ please!! **do not use a pointer please Problem B: Bunny hop Modify the program so that the rabbits

(C++) Write a program with only C++ please!!

**do not use a pointer please

Problem B: Bunny hop

Modify the program so that the rabbits move around the board. Each rabbit should individually randomly decide to me up, down, left or right on the board. However, if the rabbit decides to move into a spot that is water (the ~), it will instead just not move at all. Since the heroine moves needs to move as well, this should be done as: First, the heroine moves. Second, check to see if the heroine is on any rabbits. Third, move all the rabbits. Fourth, check to see if any rabbits moved onto the heroine. This means it is possible to have two battles in a row if (1) the heroine moves onto a rabbit then (2) a rabbit moves onto the heroine (where the old rabbit was). Note: it is okay if rabbits can move on top of the town.

image text in transcribed

image text in transcribed

image text in transcribed

Example 1: 0 geany run script V17GGZ.sh Moving onto rabbits will always start fight the do not get to move away yet) HP: 10 Which direction do you want to move 'w'-up. 'a'-left. 's'-doun. 'd'right)?s 0e geany_run_script_VI7GGZ.sh Jasper Spookey smacks Rabbit for 1 damage.(press enter to continue...) Rabbit smacks Jasper Spookey for 1 damage.(press enter to continue...) Jasper Spookey smacks Rabbit for 1 damage.(press enter to continue...) Rabbit perishes. (press enter to continue Example 1: 0 geany run script V17GGZ.sh Moving onto rabbits will always start fight the do not get to move away yet) HP: 10 Which direction do you want to move 'w'-up. 'a'-left. 's'-doun. 'd'right)?s 0e geany_run_script_VI7GGZ.sh Jasper Spookey smacks Rabbit for 1 damage.(press enter to continue...) Rabbit smacks Jasper Spookey for 1 damage.(press enter to continue...) Jasper Spookey smacks Rabbit for 1 damage.(press enter to continue...) Rabbit perishes. (press enter to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago