func (ms *mapStock) Add(entity Entity) error {
	if entity == nil {
		return fmt.Errorf("could not add Entity, as it was nil")
	}
	if entity.Kind() != ms.KindStocked() {
		return fmt.Errorf(
			"stock '%s' could not stock entity '%s'; stock accepts '%s' but kind is '%s'",
			ms.Name(),
			entity.Name(),
			ms.KindStocked(),
			entity.Kind(),
		)
	}
	ms.stock[entity] = true
	return nil
}
time complexity O(1)
package simulator
import "fmt"
type mapStock struct {
	name       StockName
	stocksKind EntityKind
	stock      map[Entity]bool
}
func (ms *mapStock) Name() StockName {
	return ms.name
}
func (ms *mapStock) KindStocked() EntityKind {
	return ms.stocksKind
}
func (ms *mapStock) Count() uint64 {
	return uint64(len(ms.stock))
}
func (ms *mapStock) EntitiesInStock() []*Entity {
	entities := make([]*Entity, 0)
	for entity := range ms.stock {
		entities = append(entities, &entity)
	}
	return entities
}