Thanks Kent for your help. Right now I am trying to get one room working with just a character and movement. Then on to creatures, multiple rooms and tracking.

Ara



On 2/20/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Ara Kooser wrote:
>
>
>     But really, what are you trying to do?
>
>     Kent
>
>
> I am trying to create rooms/tiles for a roguelike game in python. I have
> some of the game coded out but I am having trouble with the map and
> character movement.

OK, so maybe you want something like this (I don't know what the initial
row of spaces is for in your post):

  >>> room = ['############',
  ...            '#.................#',
  ...            '#.................#',
  ...            '#.................#',
  ...            '#.................#',
  ...            '#####.######']
  >>>
  >>> for line in room:
  ...   print line
  ...
############
#.................#
#.................#
#.................#
#.................#
#####.######

Well, not quite like that. It looks like your original post is formatted
for a proportional font; you will probably have better luck sticking to
a fixed width font:

  >>> room = ['############',
  ...         '#..........#',
  ...         '#..........#',
  ...         '#..........#',
  ...         '#..........#',
  ...         '#####.######']
  >>>
   >>> for line in room: print line
  ...
############
#..........#
#..........#
#..........#
#..........#
#####.######

That looks more like a room. You will have to figure out how to organize
and print multiple rooms but maybe this will get you started on the
right track...

Kent




--
Fatti non foste per viver come bruti, ma per seguir virtute e canoscenza - Dante Alighieri
You were not made to live like brutes, but to pursue virtue and knowledge
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to