Added a quick check to make sure that board is at least 5x5. That way there is enough space for all ships.
Almost got the refactoring of the "getPossibleShipDirection" function working. The only thing that appears to be broken is checking the down direction.