home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify code.
[plomrogue2-experiments]
/
new
/
plomrogue
/
mapping.py
diff --git
a/new/plomrogue/mapping.py
b/new/plomrogue/mapping.py
index 9ae5444632db89a13cbccf9f88c0b041353054c2..b670938e64658e2ff34306483bdb6cb7adf12d77 100644
(file)
--- a/
new/plomrogue/mapping.py
+++ b/
new/plomrogue/mapping.py
@@
-18,13
+18,10
@@
class YX(collections.namedtuple('YX', ('y', 'x'))):
class Map:
class Map:
- def __init__(self, size=YX(0, 0), init_char = '?', start_indented=True,
- awakeness=0):
+ def __init__(self, size=YX(0, 0), init_char = '?', start_indented=True):
self.size = size
self.terrain = init_char * self.size_i
self.start_indented = start_indented
self.size = size
self.terrain = init_char * self.size_i
self.start_indented = start_indented
- self.awake = awakeness # asleep if zero
- self.stats = {}
def __getitem__(self, yx):
return self.terrain[self.get_position_index(yx)]
def __getitem__(self, yx):
return self.terrain[self.get_position_index(yx)]
@@
-67,6
+64,12
@@
class Map:
+class MapChunk(Map):
+ awake = 0 # asleep if zero
+ stats = {}
+
+
+
class MapGeometry():
def get_directions(self):
class MapGeometry():
def get_directions(self):