I have my battleships game working completely accept ships do not generate randomly. I have each point of the ship assigned to certain squares.
ship_1_1 = Grid ship_1_2 = Grid ship_1_3 = Grid ship_1_4 = Grid
Randomly generating ships is harder than I thought. For these reasons:
- Ships cant overlap
- Ships must be within the gamegrid
- Ships must randomly generate
- Ships must be going down or across.
Any ideas of how to make the ships randomly generate while avoiding these problems?