Battleship Implementation in Java