Added nextMoves method to Task2, and added requisite tests