private void remove() throws IOException {
        System.out.print("Ship index guide:\n"
                + "     Carrier: 0\n"
                + "     Battleship: 1\n"
                + "     Submarine: 2\n"
                + "     Destroyer: 3\n"
                + "     Patrol Boat: 4\n"
                + "Enter index of ship to remove: ");
        String str = s.next();
        try {
            int i = Integer.parseInt(str);
            if (0 <= i && 5 > i) {
                if (0 != Setup.getPlayerBoard().getShip(i).locationIndex) {
                    //Setup.getPositioner().pushToStack(i);
                    Setup.getPositioner().decrementPositioned();
                    Setup.getPlayerBoard().removeShip(i);
                    Setup.getPlayerBoard().draw();
                    System.out.print("Use 'continue' to replace ship: \n");
                } else {
                    System.out.print("Ship not yet placed.\n");
                    remove();
                }
            } else {
                System.out.print("Index out of bounds.\n");
                remove();
            }
        } catch (NumberFormatException e) {
            if (!str.equals("c") && !str.equals("cancel")) {
                System.out.print("Invalid input.\n");
            }
        } 
    }