Checking for illegal placement of ships