Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Jobek do brasil

19/03/2021 Client: saad24vbs Deadline: 24 Hours

CSCI-1200 Data Structures — Spring 2018 Homework 6 — Battleship Recursion

In this homework we will solve ship placement puzzles inspired by the pencil & paper “Battleship” game that was later made into a board game by Milton Bradley and then a puzzle that is a regular feature in Games magazine. You can read more about the history of the game and see examples here:

https://en.wikipedia.org/wiki/Battleship_(game)

https://en.wikipedia.org/wiki/Battleship_(puzzle)

This is a popular game with lots of material available online. You may not search for, study, or use any code related to the Battleship game or puzzle. Please carefully read the entire assignment and study the examples before beginning your implementation.

Battleship Puzzles - How to Play

Your program will accept one or two command line arguments. The first argument is the name of a battleship puzzle board file similar to the file shown below. This sample file begins with the dimensions of the board, in this case 4 rows and 5 columns. Next, we give the number of cells in each row and each column that are occupied by a ship. The other cells in the row are open water. Then, we have a simple list of the ships that must be placed on that board. All ships are 1 cell wide, but each ship type has a different length (# of cells): submarine = 1, destroyer = 2, cruiser = 3, battleship = 4, carrier = 5, cargo = 6, and tanker = 7.

board 4 5

rows 4 0 2 1

cols 1 2 1 2 1

cruiser

destroyer

submarine

submarine

4

1 2 1 2 1

1

2

0

Your task is to place the ships on the board satisfying the counts for each row. One important rule in placing the ships is that no two ships may occupy adjacent cells (including the diagonal). The sample puzzle above actually has two solutions. The diagram and sample output below show one of the solutions. Can you manually find the other?

Solution:

cruiser 0 0 horizontal

submarine 0 4

submarine 2 1

destroyer 2 3 vertical

+-----+

| o|4

| |0

| o ^ |2

| v |1

+-----+

12121

1

2

0

4

1 2 1 2 1

Output Formatting

To ensure full credit on the homework server, please format your solution exactly as shown above. The solution must begin with the keyword “Solution:”, followed by a line for each ship beginning with the ship type, the row and column of the upperleftmost cell occupied by the ship, and for non-submarine ships the orientation of the ship (“horizontal” or “vertical”). The ships may be listed in any order. After the ship

https://en.wikipedia.org/wiki/Battleship_(game)
https://en.wikipedia.org/wiki/Battleship_(puzzle)
placement details, you should make an ASCII art diagram of the solved board (this will help in debugging). However, this will be graded by the TAs not the automated grading on the homework server, so you may format your ASCII art diagram somewhat differently than the sample above.

If the optional second argument find_all_solutions is not specified, your program should output to std::cout any single valid solution to the puzzle. If the optional argument find_all_solutions is speci- fied, your program should output all valid, unique solutions (in any order) and then also print at the bottom the number of solutions found, e.g., “Found 2 solution(s)”. If the puzzle has no solutions, your program should print “No solutions”. When searching for all solutions, make sure you do not double count or du- plicate the same solution. For example, if a puzzle has two submarines, swapping the submarines does not make a “new” solution.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Assignment Hut
Quick N Quality
Coursework Assignment Help
Professional Accountant
Homework Guru
Instant Homework Helper
Writer Writer Name Offer Chat
Assignment Hut

ONLINE

Assignment Hut

I have read and understood all your initial requirements, and I am very professional in this task.

$55 Chat With Writer
Quick N Quality

ONLINE

Quick N Quality

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$94 Chat With Writer
Coursework Assignment Help

ONLINE

Coursework Assignment Help

I will cover all the points which you have mentioned in your project details.

$30 Chat With Writer
Professional Accountant

ONLINE

Professional Accountant

I will cover all the points which you have mentioned in your project details.

$65 Chat With Writer
Homework Guru

ONLINE

Homework Guru

I will cover all the points which you have mentioned in your project details.

$27 Chat With Writer
Instant Homework Helper

ONLINE

Instant Homework Helper

Give me a chance, i will do this with my best efforts

$80 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Let her go lyrics translation - Bible Essay - Formal outline for research paper - This is a short essay on anatomy - Get the point wabbit e 69 answers - Give me liberty an american history volume 2 chapter summaries - Informatics and Nursing Sensitive Quality Indicators - Bose institute of nuclear physics - Journel - At the beginning of 2013, the bradley company had the following balances in its accounts: - Subnetting practice exercises - Girl at mirror painting analysis - Marketing domain meaning - What is external stability in economics - Moreton bay council rates - Barium chloride and sulfuric acid net ionic equation - Balmain power station history - El ecoalbergue finca esperanza verde se encuentra en una zona montañosa de costa rica. - Virtual fetal pig dissection worksheet - Osha's use of incorporation by reference - Guangzhou dream factory trailer - How to one way anova spss - Fieldwork on prostitution in the era of aids - Multisim logic converter - What were the causes of the metrolink accident - Yeats rag and bone - How to solve ln 1 x - Computer - Foundation of army leadership powerpoint - Fourier series - Skittles taste the rainbow - Ionic equation for magnesium and hydrochloric acid - Excel remembers the last ____ actions you have completed - The first step that nutrisystem likely took in selecting a target market was ________. - Assignment 300 words - Hsi talents - The hip hop hippy to that dibby - 1998 dbq ap us history - Primary school general knowledge quiz - Lady macduff scene macbeth - Shanghai international studies university - Assignment cover page format - Instruction of students with severe disabilities 8th edition pdf free - What number am i - Should vaccines be required essay - Compare and contrast fahrenheit 451 - Analysis - Problem 26.57 - Discussion responses - Adding subtracting integers word problems - Week 4 Determining Benchmarks - The contemporary reader gary goshgarian pdf - Chobani making greek yogurt a household name - Tolerable misstatement and sample size - How would you characterize chiquita's historical approach to global management - Lewis and stark is a public accounting firm - Anode cathode photoelectric effect - Aults driving school homework answers - How to bend tattoo springs - Law: Appellate brief taking side of united states - A jogger travels a route that has - Tone colour music words - What are the five objectives of the sun smart policy - Project - What is an episodic soap note - 41 manor drive frankston south - Why should we study film hum 150 - What is fairly present in an audit report - Social Work Process Recording - PPT Team Management - Examples of reversible change - Dolch sight words in order of frequency - Austin brown unchained melody - Definition of Hyper-threading for two audiences - Nursing research - 10 northam street glen waverley - Fuji xerox document management solutions - Mt baw baw apartments - Passenger let her go lyrics meaning - Safe harbor provisions under hipaa - Marketing Writing Assignment - African History - Australian securities and investments commission v fortescue metals group ltd - ESSAY - Toyota's european drive case study - Vcaa physics advice for teachers - Time Bomb Case - Migration Discussion - 2 paragraphs - Chap. 6 Q HR - 38 amaretto circuit manor lakes - Investors require a 15 rate of return - Barnaby bear video clips - For this assignment, you are required to research the benefits as well as the challenges associated with Big Data Analytics for Manufacturing Internet of Things. - Lola log on louisiana - Can t open eyes underwater - Monsanto attempts to balance stakeholder interests case study answer - Advantages and disadvantages of moving iron instruments - Moc management of change - Ams mit moodle - A cantilever beam of rectangular cross section