Advertisement
Guest User

afs

a guest
Apr 19th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. do
  2.             {
  3.                 clrscr(0, 7 + sizetab.at(1) * 2);
  4.                 cout << "Enter the coordinates: " << endl;
  5.                 setcolor(GREEN, BLACK);
  6.  
  7.                 xcharascii = xintascii + sizetab.at(0) - 1;    // Max Column
  8.  
  9.                 ycharascii = yintascii + sizetab.at(1) - 1;    // Max Line
  10.  
  11.    
  12.                 cout << "LINE (A.." << ycharascii << ")  ";
  13.                 cout << "COLUMN(a.." << xcharascii << ")  ";
  14.                 cin >> line >> column;
  15.  
  16.                 cin.ignore(1000, '\n');
  17.  
  18.                
  19.                 pline = int(line) - yintascii;      // gets number of line from the char line(A..Z)
  20.                 pcolumn = int(column) - xintascii;  // gets number of column from the char column (a...Z)
  21.  
  22.  
  23.                
  24.             } while (ChangeShip(board,pline,pcolumn,sfiletab,xcharascii,ycharascii,sizetab,ships)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement