It is also useful to know what points on the grid would be occupied by a ship at a certain location. These are produced by just_ship()
. There are a relatively small number of locations and this ends up being one of the slowest and most frequently called parts of the code, so the results are memoized.