im building a battleship validation checkup on a given 2d array which is given with 1\'s and 0\'s 1 means a ship 0 means empty. the basic rules for this are