11 lines
291 B
Python
11 lines
291 B
Python
|
class Zone(object):
|
||
|
def __init__(self, name, level=0):
|
||
|
self.name = name
|
||
|
self.level = level
|
||
|
|
||
|
def __add__(self, other):
|
||
|
return Zone(self.name + other.name, level=self.level+other.level)
|
||
|
|
||
|
def __cmp__(self, other):
|
||
|
return cmp(self.level, other.level)
|