python code from tutorial of rogue-like ascii dungeon explorer