laneya

multiplayer roguelike game
git clone https://git.ce9e.org/laneya.git

commit
ebcc3f3475b73e5a8c7c87d0d659fffd2df4f75b
parent
0d1d11840fcbe32a17a56e10f1b00afca683024c
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2014-11-01 10:40
allow to pass height/width to map constructor

Diffstat

M laneya/map.py 7 +++++--

1 files changed, 5 insertions, 2 deletions


diff --git a/laneya/map.py b/laneya/map.py

@@ -16,10 +16,13 @@ class Map(object):
   16    16     one for sprites (e.g. :py:meth:`move_sprite`).
   17    17 
   18    18     """
   19    -1     def __init__(self, server):
   -1    19     def __init__(self, server, width=60, height=40):
   20    20         self.server = server
   -1    21         self.width = width
   -1    22         self.height = height
   21    23         self.sprites = {}
   22    -1         self.movable_layer = [[None for i in xrange(100)] for i in xrange(100)]
   -1    24         self.movable_layer = [
   -1    25             [None for i in xrange(height)] for i in xrange(width)]
   23    26         self.ghost = Ghost('example', self, 15, 15)
   24    27 
   25    28     def step(self):