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
Step 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