Some tweaks for Point

develop
RusAnon 2010-05-03 18:03:06 +11:00
parent e4210ad444
commit 2fd787cc8a
1 changed files with 8 additions and 1 deletions

@ -10,7 +10,14 @@ class Point(object):
self.block = block self.block = block
def get_block(self): def get_block(self):
if not self.block:
return Point(self.x/16, self.y/16, self.z, True) return Point(self.x/16, self.y/16, self.z, True)
else:
return self
@property
def xyz(self):
return (self.x, self.y, self.z)
def __repr__(self): def __repr__(self):
b = '' b = ''