Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. int xtra = 0;
  2. for(int row = 0; row < boardP2.length; row++) {
  3.  
  4. for(int col = 0; col < boardP2.length; col++) {
  5.  
  6. System.out.print(row + " " + col);
  7. if(boardP2[row][col].equals("S")) {
  8. shipsLeft = true;
  9.  
  10. xtra++;
  11. } else if (xtra == 9) {
  12. shipsLeft = false;
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement