21 lines
439 B
Python
21 lines
439 B
Python
|
class InventorySlot:
|
||
|
'One item plus quantity'
|
||
|
|
||
|
#Do I want to add the value here too?
|
||
|
|
||
|
def __init__(self, item, quantity):
|
||
|
self.item = item
|
||
|
self.quantity = quantity
|
||
|
|
||
|
def incItem(self, amount):
|
||
|
self.quantity += amount
|
||
|
|
||
|
def decItem(self, amount):
|
||
|
self.quantity -=amount
|
||
|
|
||
|
def getQuantity(self):
|
||
|
return self.quantity
|
||
|
|
||
|
def getName(self):
|
||
|
return self.item.getName()
|