Battleship! ----------- Revealed board (for verification purposes): +-+-+-+-+-+-+-+ 1 |0|0|0|2|0|0|0| +-+-+-+-+-+-+-+ 2 |0|0|0|2|0|0|0| +-+-+-+-+-+-+-+ 3 |3|3|3|0|0|0|0| +-+-+-+-+-+-+-+ 4 |5|5|5|5|5|0|0| +-+-+-+-+-+-+-+ 5 |0|0|4|4|4|4|0| +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+ 1 | | | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 1 Miss! There was nothing at that location +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 1 You already guessed that location! +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 1 You already guessed that location! +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 8 Error: Invalid column. +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 6 Enter a column to guess > 1 Error: Invalid row. +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 6 Enter a column to guess > 8 Error: Invalid row. +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 1 You already guessed that location! +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > a Error. You did not enter an integer value. Please try again. +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > dog Error. You did not enter an integer value. Please try again. +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 1 You already guessed that location! +-+-+-+-+-+-+-+ 1 |0| | | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess > 1 Enter a column to guess > 2 Miss! There was nothing at that location +-+-+-+-+-+-+-+ 1 |0|0| | | | | | +-+-+-+-+-+-+-+ 2 | | | | | | | | +-+-+-+-+-+-+-+ 3 | | | | | | | | +-+-+-+-+-+-+-+ 4 | | | | | | | | +-+-+-+-+-+-+-+ 5 | | | | | | | | +-+-+-+-+-+-+-+ 1 2 3 4 5 6 7 Enter a row to guess >