Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added detailed information of caught pokemon to the console #52

Merged
merged 1 commit into from
Jul 26, 2016

Conversation

timewalts
Copy link
Contributor

Console now shows a new line with CP, IV and current candies of the pokemon caught.

List<Pokemon> pokemonList = context.getApi().getInventories().getPokebank().getPokemons();
Collections.sort(pokemonList, (a, b) -> Long.compare(a.getCreationTimeMs(), b.getCreationTimeMs()));
Pokemon p = pokemonList.get(pokemonList.size() - 1);
System.out.println("Cp:" + p.getCp() + " IV:" + p.getIndividualAttack() +"/"+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using String.format here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather, System.out.printf

@SwipeX SwipeX merged commit cd2e270 into SwipeX:master Jul 26, 2016
@SwipeX
Copy link
Owner

SwipeX commented Jul 26, 2016

as @kyleshrader suggested, we can try to use printf or String.format where possible, but this is not the only offender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants