Question: c++ battleship program. need the game.cpp. the battleship.h is : #ifndef BATTLESHIP_H_ #define BATTLESHIP_H_ const int FLEET_SIZE=5; const int FIELD_SIZE=5; struct location{ int x; char
c++ battleship program. need the game.cpp.
the battleship.h is :
#ifndef BATTLESHIP_H_ #define BATTLESHIP_H_ const int FLEET_SIZE=5; const int FIELD_SIZE=5; struct location{ int x; char y; }; struct ship{ location loc; bool sunk; }; void initialize(ship[]); location pick(); bool match(ship, location); int check(const ship[], location); void deploy(ship[]); void printShip(ship); void printFleet(const ship[]); bool operational(const ship[]); location fire(); void sink(ship&); #endif
the battleship.cpp is:
#include


![char y; }; struct ship{ location loc; bool sunk; }; void initialize(ship[]);](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f532917ab3b_29666f53290b33f0.jpg)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
