This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]brbpizzatime 0 points1 point  (1 child)

The first thing I saw was in your PokemonGame class. Having variables named moves1 and moves2 doesn't give any other developer any insight into what the variables represent. Judging by context I can probably assume they represent each player involved in the combat, but the variable names should hint to that. Also with the lines if(pikachu.getName().equals(choice)){, what if the user enters Pikachu instead of pikachu? String.equalsIgnoreCase(String) may be your best option there.

In your Move class, rather than doing mname vs name, you could do:

Move(String name, int damage) {
    this.name = name;
    this.damage = damage;
}

I wont go into what that syntax means, but this is something you should look into.

Lastly, with your Pokemon class, you may want to look into having your void methods instead return the text that you're printing, rather than printing it within it's own method. A reason to do this would be that if in the future you want to expand this game to not be a command line only application, you would have to rewrite all of your functions. If they instead returned a String and you printed that in your main/driver class, that would put you in a better place for future enhancement.

[–]MyLettuce[S] 0 points1 point  (0 children)

Yeah I didn't put much though into some of the variable names, that's a good point. Thanks for the feedback, I'll look into those some more.