Question: Please use java. Thanks! the previous code could be found at: https://www.chegg.com/homework-help/questions-and-answers/1-board-m-r-computer-sim-alate-rectangular-mon-board-required-use-2-dimensional-array-repr-q30164288 3 Turns Each turn, the user will input a location r, y to

Please use java. Thanks!

the previous code could be found at: https://www.chegg.com/homework-help/questions-and-answers/1-board-m-r-computer-sim-alate-rectangular-mon-board-required-use-2-dimensional-array-repr-q30164288

Please use java. Thanks! the previous code could be found at: https://www.chegg.com/homework-help/questions-and-answers/1-board-m-r-computer-sim-alate-rectangular-mon-board-required-use-2-dimensional-array-repr-q301642883 Turns Each turn, the user will input a location r, yto attack on the board. You can assume that a and yare integers, but you ll need to check if the pair z,

3 Turns Each turn, the user will input a location r, y to attack on the board. You can assume that a and y are integers, but you ll need to check if the pair z, y is a valid location on the game board later. If there is no boat at the location, print "miss" If the user has already attacked that location or location is out of bounds, print "penalty" If there is a boat, print ht".If the boat sinks, print "sunk". Do not print "hit" again if the user has already "hit" this location. In addition to normal cannon fire, the user will have the option to utilize a recon "drone" to scan a small area of the board. You can implement this option however you wish, as long as it is plain to the user what must be done to use the drone. The drone will allow the player to see the contents of the squares in a 3 x 3 area around the input location, but this will not count as a shot. Instead, the user will lose 4 additional turns while waiting for the drone to return from its mission. Therefore, if the user chooses to use the drone, print "recon". If the user sends the drone out of bounds, the user will receive a penalty for a shot out of bounds, wait 4 additional turns for the drone to return, but the board will not be revealed, since the drone will not return to the user with any valuable information 3 Turns Each turn, the user will input a location r, y to attack on the board. You can assume that a and y are integers, but you ll need to check if the pair z, y is a valid location on the game board later. If there is no boat at the location, print "miss" If the user has already attacked that location or location is out of bounds, print "penalty" If there is a boat, print ht".If the boat sinks, print "sunk". Do not print "hit" again if the user has already "hit" this location. In addition to normal cannon fire, the user will have the option to utilize a recon "drone" to scan a small area of the board. You can implement this option however you wish, as long as it is plain to the user what must be done to use the drone. The drone will allow the player to see the contents of the squares in a 3 x 3 area around the input location, but this will not count as a shot. Instead, the user will lose 4 additional turns while waiting for the drone to return from its mission. Therefore, if the user chooses to use the drone, print "recon". If the user sends the drone out of bounds, the user will receive a penalty for a shot out of bounds, wait 4 additional turns for the drone to return, but the board will not be revealed, since the drone will not return to the user with any valuable information

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!