Made all types implement Identifiable

This commit is contained in:
2019-09-09 09:18:34 +09:00
parent 8bfb1e0b4d
commit 85bd1441a6
4 changed files with 20 additions and 0 deletions

View File

@ -62,6 +62,11 @@ func (inventory *Inventory) SwapSlots(a, b int) error {
return nil
}
// GetID returns the ID.
func (inventory *Inventory) GetID() string {
return inventory.UserID
}
// NewInventory creates a new inventory with the default number of slots.
func NewInventory(userID UserID) *Inventory {
inventory := &Inventory{