Fixed getNextState always returning null

numberOfMoves was never getting initialized