Nintendo has gone from staunch opponent of mobile games to positioning itself as a leader in the field.