Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int xtra = 0;
- for(int row = 0; row < boardP2.length; row++) {
- for(int col = 0; col < boardP2.length; col++) {
- System.out.print(row + " " + col);
- if(boardP2[row][col].equals("S")) {
- shipsLeft = true;
- xtra++;
- } else if (xtra == 9) {
- shipsLeft = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement