Question
(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.
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 continueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started