Represents a ship in the game.
More...
#include <BattleshipGame.h>
|
| Ship (std::string n, int s) |
| Constructs a Ship with a given name and size. More...
|
|
|
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.
|
|
Represents a ship in the game.
◆ Ship()
Ship::Ship |
( |
std::string |
n, |
|
|
int |
s |
|
) |
| |
|
inline |
Constructs a Ship with a given name and size.
- Parameters
-
n | The name of the ship. |
s | The size of the ship. |
The documentation for this class was generated from the following file: