Advertisement
Leedwon

Untitled

Jun 10th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #ifndef STATKIH_H_
  2. #define STATKIH_H_
  3.  
  4.  
  5. class Board
  6. {
  7. private:
  8.     char board[10][20];
  9.     Ship destroyer;
  10.     Ship cruiser[2];
  11.     Ship frigate[3];
  12.     Ship submarine[4];
  13. public:
  14.     Board();
  15.     void ShowBoard();
  16.     void PutShips();
  17.     void Update();
  18. };
  19. class Ship
  20. {
  21. private:
  22.     int length;
  23.     int hp;
  24.     int  x;
  25.     int  y;
  26. public:
  27.     Ship(int l = 0) : length(l), hp(l) {}
  28.     void SetLen(int l) { length = l; }
  29.     void SetHp(int h) { hp = h; }
  30.     void GetCoords();
  31.     bool IsDead();
  32.     bool IsHit();
  33.  
  34. };
  35. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement