[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Text-Based RPG




Could I make a Room class that has functions based on different variables and then make a separate class for each room like AnthroTavern(Room) so I could base it on the rom class and use the functions for the room class?

Yes, you could (and should). It looks like you're handling each room and
action as a special case, which means a lot of repeated work. For
instance, you have several commands for "talk to [person]". What if you
processed the input a bit more, like so: