Browse Source

Added disclaimer to printBoard

Removed Scanner, that was just for debug
master
school 7 years ago
parent
commit
bf744987f2
  1. 15
      Battleship.java

15
Battleship.java

@ -3,7 +3,7 @@
// Cruiser = 3
// Submarine = 3
// Pilot = 2
import java.util.Scanner;
public class Battleship{
public static final int X = 0;
public static final int Y = 0;
@ -75,7 +75,7 @@ public class Battleship{
}
}
public static void randomizingBoard(int[][] board){
Scanner input = new Scanner(System.in);
int[] boundTL = {0,0};
int[] boundBR = {board[0].length-1, board.length-1};
int length;
@ -138,6 +138,7 @@ public class Battleship{
}
}
// method to make debug easier
// NOTE: THIS GAME HAS THE X Y AXIS FLIPPED. Makes no difference all things still work
public static void printBoard(int[][] arr){
System.out.print(" ");
for (int i = 0; i < arr[0].length-1; i ++){
@ -161,14 +162,4 @@ public class Battleship{
System.out.println(s + "\n");
}
}
/*
public static void main(String[] args){
int[][] testBoard = new int[10][10];
randomizingBoard(testBoard);
printBoard(testBoard);
//printBoard(testBoard);
}
*/
}
Loading…
Cancel
Save