levels method
This commit is contained in:
parent
92c06d9bda
commit
f5b45dc7db
12
shelf.py
12
shelf.py
@ -25,3 +25,15 @@ class Shelf:
|
|||||||
|
|
||||||
def get_color(self):
|
def get_color(self):
|
||||||
return self.color
|
return self.color
|
||||||
|
|
||||||
|
def levels(self):
|
||||||
|
r = ''
|
||||||
|
str = [0, 0, 0]
|
||||||
|
if len(self.level1) > 0:
|
||||||
|
str[0] = 1
|
||||||
|
if len(self.level2) > 0:
|
||||||
|
str[1] = 1
|
||||||
|
if len(self.level1) > 0:
|
||||||
|
str[2] = 1
|
||||||
|
r.join(str)
|
||||||
|
return r
|
Loading…
Reference in New Issue
Block a user