Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago