function for placing each ship