Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Battleboats is a probability-based board game that challenges the user to locate enemy boats hidden on a rectangular 10x10 grid. The purpose of the game

Battleboats is a probability-based board game that challenges the user to locate enemy boats hidden on a rectangular 10x10 grid. The purpose of the game is to locate and destroy every enemy boat in the least number of guesses. Each boat consists of n squares arranged in a row on the board. The game proceeds as players alternatingly guess squares on their opponents board in an attempt to hit their boats. A boat is sunk when each square that it occupies is hit by the opponents guess. It is important for the game to keep track of the position and orientation of each boat on the board, as well as which squares of the boat have been hit. Your task for the second part of this assignment is to design a BattleBoat class to maintain all the necessary information for a single boat. (Assume that the game board contains multiple instances of the BattleBoat class, one for each boat.)

Write a C++ header (.h) file describing the functions and variables that should constitute the BattleBoat class. Mark functions as const when applicable. You do not need to implement any of the functions or write a .cpp file. You do not need to design any classes other than BattleBoat.

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

Sql All In One For Dummies 7 Books In One

Authors: Allen G Taylor ,Richard Blum

4th Edition

1394242298, 978-1394242290

More Books

Students also viewed these Databases questions

Question

Apply We First marketing to a social media campaign.

Answered: 1 week ago

Question

1. Explain how business strategy affects HR strategy.

Answered: 1 week ago