this was pretty simple, but the second star threw me a little. I was
trying to do the check in a clever way. the conditional bounds-check I
landed on is sadly inelegant compared to what I had in mind, but it has
the minor advantage of actually working.
time spent on the first star: maybe an hour
time spent on the second star: maybe 2 hours