Question: please provide solution in python as soon as possible Battleships is a game played on a rectangular board. You are given a representation of such

 please provide solution in python as soon as possible Battleships is

please provide solution in python as soon as possible

Battleships is a game played on a rectangular board. You are given a representation of such a board of size N (height) M (width) with information about the locations of the ships. The board is given as an array B, whose every element is a string that corresponds to one row of the game board. Each character of each string represents a cell of the board and is either: - a'm' character, marking a part of a ship; or - a' ' character, representing an empty cell. Two cells that share a side and have a value of '\#' are parts of the same ship. Cell (X,Y) shares a side with cells (X,Y1),(X,Y+1),(X1,Y) and (X+1,Y). In the Battleships game there are three types of ships: Patrol Boats of size 1: Submarines of size 2, which come in two shapes: Destroyers of size 3, which come in six shapes: ocomplete is connected I Al changes aaved

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!