Added the crazy, optimized hasMoreMoves check.