I am a beginner and this is my first week with 2D arrays.
I have this code that is for a 2D array battleship program, but no I have to do the following
So the boats only take up 1 index, and the board is 4x4? You can just check if the row and column of the two boats are the same, and if they are, just generate a new position for one of them until they're different. Then just call place_boats and pass the positions of the boats in as parameters. Then set those positions on the board to something other than 'O'.