game_board class might need more function but this is for now

Dependents:   Final_Project

Committer:
AndyTran
Date:
Mon Dec 07 22:10:04 2015 +0000
Revision:
3:e21ecfae42e4
Parent:
2:1a54e4ed2669
duck

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AndyTran 0:06bd2763aa53 1 #include <iostream>
AndyTran 0:06bd2763aa53 2 using namespace std;
AndyTran 0:06bd2763aa53 3
AndyTran 0:06bd2763aa53 4 class game_board
AndyTran 0:06bd2763aa53 5 {
AndyTran 0:06bd2763aa53 6 private:
AndyTran 2:1a54e4ed2669 7 //unsigned char _gameboard [6][27];
AndyTran 0:06bd2763aa53 8 string A_row,B_row,C_row,D_row,E_row,F_row,N_row, label;
AndyTran 2:1a54e4ed2669 9 int _my_ship [6][6];
AndyTran 3:e21ecfae42e4 10 int ship_lose;
AndyTran 0:06bd2763aa53 11 public:
AndyTran 2:1a54e4ed2669 12 game_board(){
AndyTran 2:1a54e4ed2669 13 int i;
AndyTran 3:e21ecfae42e4 14 ship_lose = 0;
AndyTran 2:1a54e4ed2669 15 for (i = 0; i < 6; i++);
AndyTran 2:1a54e4ed2669 16 {
AndyTran 2:1a54e4ed2669 17 _my_ship[i][0] = 0;
AndyTran 2:1a54e4ed2669 18 _my_ship[i][1] = 0;
AndyTran 2:1a54e4ed2669 19 _my_ship[i][2] = 0;
AndyTran 2:1a54e4ed2669 20 _my_ship[i][3] = 0;
AndyTran 2:1a54e4ed2669 21 _my_ship[i][4] = 0;
AndyTran 2:1a54e4ed2669 22 _my_ship[i][5] = 0;
AndyTran 2:1a54e4ed2669 23 }
AndyTran 2:1a54e4ed2669 24 };
AndyTran 2:1a54e4ed2669 25 void new_game_board(); // done
AndyTran 0:06bd2763aa53 26 bool place_hit_miss_friendly (int row, int colum); //check
AndyTran 0:06bd2763aa53 27 void place_ship(int row, int colum); //done
AndyTran 0:06bd2763aa53 28 string get1row (int row); //done
AndyTran 0:06bd2763aa53 29 bool looser(); //done
AndyTran 0:06bd2763aa53 30 void place_hit_miss_enemy (int row, int colum, bool hit_miss);//done
AndyTran 0:06bd2763aa53 31 };