The text above is a little vague on exactly how one treats the jokers when passing across over the bottom of the edge. Specifically, they do behave differently there than at other positions so saying that the deck is a "loop" is not perfectly correct. The following comment in Scheiers original text helped me figure out how I needed to implement that special case: "If the joker is the last card, think of it as the first card before you start counting."