Skip to content
← Back to Community
Battleship
Profile icon
IsaacArsenault

C++ How do you code verification for overlapping ships on battleship? Someone please look at my code and give me suggestions. <3

Voters
Profile icon
IsaacArsenault
Comments
hotnewtop
Profile icon
Geocube101

You could probably test if the position of the ship is already inside the array responsible for holding positions.
If the square needed to be filled already has the character '*' in it, the position is already taken