Only the left and right edges of the dungeon act as walls. The top and bottom 'wrap' around, so you can use an arrow to move from a space in the bottom row to a space in the top one, or go from the top to the bottom.
Oh, wow, I hadn't understood that in the rules... Ok, I think I have it all pretty clear now. Just one more question and I think that I will have finished with the doubts. Is there a penalty for going through previously explored rooms?... In Dark Fort, there are roaming enemies lurking if you undo your steps but I don't think I've read anything about it in this game.