some refactoring, hopefully making this a little clearer
ship placement and legality logic