Become a Pokemon Master Challenge Project (Python)

Congratulations on completing your project!

Compare your project to our solution code and share your project below! Your solution might not look exactly like ours, and that’s okay! The most important thing right now is to get your code working as it should (you can always refactor more later). There are multiple ways to complete these projects and you should exercise your creative abilities in doing so.

This is a safe space for you to ask questions about any sample solution code and share your work with others! Simply reply to this thread to get the conversation started. Feedback is a vital component in getting better with coding and all ability levels are welcome here, so don’t be shy!

About community guidelines: This is a supportive and kind community of people learning and developing their skills. All comments here are expected to keep to our community guidelines

How do I share my own solutions?

  • If you completed the project off-platform, you can upload your project to your own GitHub and share the public link on the relevant project topic.
  • If you completed the project in the Codecademy learning environment, use the share code link at the bottom of your code editor to create a gist, and then share that link here.

Do I really need to get set up on GitHub?
Yes! Both of these sharing methods require you to get set up on GitHub, and trust us, it’s worth your time. Here’s why:

  1. Once you have your project in GitHub, you’ll be able to share proof of your work with potential employers, and link out to it on your CV.
  2. It’s a great opportunity to get your feet wet using a development tool that tech workers use on the job, every day.

Not sure how to get started? We’ve got you covered - read this article for the easiest way to get set up on GitHub.

Best practices for asking questions about the sample solution

  • Be specific! Reference exact line numbers and syntax so others are able to identify the area of the code you have questions about.

I utterly lost track of time to this last night. I have forced myself to stop the project here (for now) so that I can continue my courses here.

Some fun things I’ve implemented:
You can do trainer battles or fight and catch wild pokemon.
You can spend gold won from trainers at a PokeShop (buy 1, 10, or max affordable)
In battle, you can see each Trainer’s pokeballs (active vs. fainted)

Some things I would still like to do:
Add a leveling/evolution system that scales appropriately.
Implement Bill’s storage PC.
Towns and gyms.

All feedback welcome!
One question I had while making this project relates to the functions that handle wild battles and trainer battles. Both events are handles very similarly, except for a few distinctions throughout each function body. I’ll admit I started writing the second function by copying the first, which was my first indicator there may be a better way. In the spirit of having a single function handle both scenarios, I explored a contextual flag (“in wild” vs. “in trainer battle”) or using decorators. The latter does not seem to be suited to merging functions that are incongruously similar, and the former felt cluttered.
Any advice is greatly appreciated!

1 Like