From bf744987f292b23f6a973900f83645e40b6fbc01 Mon Sep 17 00:00:00 2001 From: school Date: Sun, 7 Oct 2018 14:07:23 -0500 Subject: [PATCH] Added disclaimer to printBoard Removed Scanner, that was just for debug --- Battleship.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Battleship.java b/Battleship.java index 969d306..b2fb8cf 100644 --- a/Battleship.java +++ b/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); - - } - */ }