Skip to content

Instantly share code, notes, and snippets.

@natanavra
Last active April 6, 2016 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natanavra/9e13bdf6049757ad54fd685fb762b82c to your computer and use it in GitHub Desktop.
Save natanavra/9e13bdf6049757ad54fd685fb762b82c to your computer and use it in GitHub Desktop.
for(int j = 0 ; j < ships[i].getLength() ; j ++) {
switch(direct) {
case vertical:
board[row + j][col] = 'S';
break;
case horizontal:
board[row][col + j] = 'S';
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment