Open VedVid opened 5 years ago
Now, every time when player wants to remove something from any []*Object it has to be written
c.Inventory = append(c.Inventory, obj[i]) copy(obj[i:], obj[i+1:]) obj[len(obj)-1] = nil *o = obj[:len(obj)-1]
Maybe implement general function TransferBetweenObjects (with Objects-with-removable as receiver, and Objects-to-append-to as argument?)
use interface, stupid. look at gobWrite and gobRead
Now, every time when player wants to remove something from any []*Object it has to be written