MiniGame-Madness
Public Member Functions | Public Attributes | List of all members
Ship Class Reference

Represents a ship in the game. More...

#include <BattleshipGame.h>

Public Member Functions

 Ship (std::string n, int s)
 Constructs a Ship with a given name and size. More...
 

Public Attributes

std::string name
 The name of the ship.
 
int size
 The size of the ship.
 
std::vector< std::pair< int, int > > positions
 The positions occupied by the ship on the grid.
 
int hits
 The number of times the ship has been hit.
 

Detailed Description

Represents a ship in the game.

Constructor & Destructor Documentation

◆ Ship()

Ship::Ship ( std::string  n,
int  s 
)
inline

Constructs a Ship with a given name and size.

Parameters
nThe name of the ship.
sThe size of the ship.

The documentation for this class was generated from the following file: