You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice work, and great job getting this in just one day. Few things though
Your attack variable should be private, same as the rest of your instance variables here. NIce job with the additional implementation, but gotta stick with encapsulation. To make it work in the child class, because you need a reference, you might want to make a getter method. Additionally, when referencing the parent class in the child, please use super instead of this. Both work (in this case at least), but super is better practice and organizationally more clear
When running, did you always get the output you expected? The condition in the while loop seems a little suspect; it will loop "while true", and you have the conidition as "if jigglypuff or pickachu have fainted". That should be false at the start, so the loop is not actually running. You get a print statement anyways just becasue you have an "else" statement
Please give a little more to your explanations, much of what you wrote was essentially in the instructions. For example, please explain a time you used method polymorphism, not just say that you did. That's what part of the code is the polymorphism, what its accomplishing, why it's useful
Your explanation of subtype polymorphism is referencing a part of the code that does not exemplify subtype polymorphism
Depending on what you think you need, actually fix these things or dont. If you do, lmk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
probably did something right