Player & Level class structure in 2D python console game?
- by Markus Meskanen
I'm trying to create a 2D console game, where I have a player who can freely move around in a level (~map, but map is a reserved keyword) and interfere with other objects.
Levels construct out of multiple Blocks, such as player(s), rocks, etc.
Here's the Block class:
class Block(object):
def __init__(self, x=0, y=0, char=' ', solid=False):
…