Hi, I am trying to create a simple roguelike-like, a game with graphics similar to roguelikes, with a few extra twists. I am trying to create a dungeon using a list, here is the code...
background = ['#', '#', '#', '#', '#', '#', '#', '#', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '.', '.', '.', '.', '.', '.', '.', '#' /n/
'#', '#', '#', '#', '#', '#', '#', '#', '#' ]
print background
My problem is that it does not work. I am trying to use '#' for walls, and '.' for the ground. I figured that with using /n/ it would make a raw list, but it doesn't work. Without the /n/, the code just prints to the screen in a jumbled, two line mess. Any suggestions on making this work?
Karim.