Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 aavedStep 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