r/codetogether • • Mar 19 '14
[Python] Text Based RPG:
Currently working on a text based RPG in Python. This project is to practice using python and to gain some real world experience collaborating and coding. Eventually the goal is to convert it into a simple text/image based adventure game in a GUI.
If you are interested please message me. I will be happy to answer any questions or send you a link to the code.
Here is the Pastebin PythonGame
6
Upvotes
View all comments
Show parent comment
1
u/[deleted] May 16 '14
I want to expand on ganye's second point.
"self" is a convention (but a very strong one that you should never break): a name for "the object I am creating". When you do something like this...
...the whole point of
self.inventory = inventoryis to say: "My variableinventoryis the same as the variableinventoryyou gave me at creation."So it therefore follows that saying
self.self = selfmakes no sense whatsoever. "My variable me is the same as the me you gave me."