So this one is a class personnage that define about the hero and how much damage it can take or deal with the enemy by displaying text and images. am i right about this?
well i don't know if you tested the functionality, but not sure if printing works that way, at least i use it differently and the indentation is messed up again but i suggest you to use pycharm as your IDE and pylint to check if your code is readable enough belive me those are important also i suggest you to watch Uncle Bob's clean code videos
I assume it is picture of your slong, no thank you. I would not willingly subject myself to that kind of imagery.
I second the motion. You can make the code cleaner and easier to read and understand in people's eyes by proper spaces between lines and other coding standards.
oh thanks that was useful ^^ i didn't know of those XD yep ^^ XD oh well congrats~ no no it say that I M FREEEEEEENCH AND PROUD OF IT
If you're looking for how to incorporate classes using a GUI and other game-related functions, it's easier to follow along a tutorial. Here is a site with a variety of games written in python. The biggest advice I can give you when writing in python is to treat it as pseudo-code, as that was how it was intended. When you start incorporating bad habits from C, Java, and PHP, that's where you end up in a mess at a later date. Also, you might consider using underscores between words in your variable names. Most people who use python do so instead of using abbreviations, camelcase, or having the whole thing in lowercase with multiple words. It's also easier to peruse when viewing code. In addition, consider using spacing between the ", +, and = where you can. Some functions don't allow for it, but it's easier to peruse your code as well as figure out what added by you versus a function or module. Again, this is just some helpful advice I've found that keeps me in the pseudo-code mind-set, and saves a fair amount of time later when test-cases are incorporated into the project. Edit: And to those suggesting IDEs, I strongly recommend SublimeText. It's extremely easy to use and saves quite a bit of time. The beta is free, by the way.
So I can help, since I code in python and can Google translate well. For def.__init__, don't name one of the arguments vie=20. Considering that you keep setting vie to different values, it makes no sense to say that you want it at 20. In addition, personnage should have both getter and setter functions. Also, I'm not entirely sure whether it's legal to initialize an object of a class in the class it's being written in. Especially the init function, since that seems to create an infinite loop. You also have a bunch of stray functions, considering you seem to be initializing enemi objects in a function, and after the Hero is initialized. Remove those, as they should probably belong to child classes.
thanks ^^ ah thanks a lot XD but what are getter and setter? humpf a pervert must have a lot of skill MOUAHAHAHAHAHAHAHAH
do you not use ''curly brackets'' in your code. after looking at i noticed it, that although you're using ''if statements'', but the code used in the ''if statements'' should be inside a curly brackets, yet i don't see you're using any of the ''curly brackets''.
curly brackets = { } nope, its not only used for c++, curly brackets used in all type of coding, for start and end start = { end = } and everything should be inside it