-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBox.py
More file actions
25 lines (20 loc) · 675 Bytes
/
Box.py
File metadata and controls
25 lines (20 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Box:
'''
self.is_allowed used for finding not used boxes
'''
def __init__(self,is_allowed=False,symbol=None):
self.is_allowed = is_allowed
self.symbol = symbol
def updateSymbol(self,symbol=None):
self.symbol = symbol
# checks if the box is allowed (used/not used box)
def isBoxAllowed(self):
if(self.is_allowed==True):
return True
else:
return False
# checks if the box is available to place the coin
def isBoxAvailable(self):
return True if self.symbol== None else False
def updateIsAllowed(self,is_allowed=True):
self.is_allowed = is_allowed