Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef STATKIH_H_
- #define STATKIH_H_
- class Board
- {
- private:
- char board[10][20];
- Ship destroyer;
- Ship cruiser[2];
- Ship frigate[3];
- Ship submarine[4];
- public:
- Board();
- void ShowBoard();
- void PutShips();
- void Update();
- };
- class Ship
- {
- private:
- int length;
- int hp;
- int x;
- int y;
- public:
- Ship(int l = 0) : length(l), hp(l) {}
- void SetLen(int l) { length = l; }
- void SetHp(int h) { hp = h; }
- void GetCoords();
- bool IsDead();
- bool IsHit();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement