Documentation ¶
Index ¶
- func Log(pattern string, args ...any)
- func Max[T constraints.Ordered](a, b T) T
- func Min[T constraints.Ordered](a, b T) T
- type Assembler
- func (c *Assembler) CanConsumeAny() bool
- func (c *Assembler) CanConsumeFrom(res Resource, dir grid.Direction) bool
- func (c *Assembler) CanProduce() bool
- func (c *Assembler) ConsumeAtPositions(base grid.Position) []grid.Position
- func (c *Assembler) ConsumeFrom(res Resource, dir grid.Direction)
- func (c *Assembler) Info() []string
- func (c *Assembler) Name() string
- func (c *Assembler) Produce() (Resource, bool)
- func (c *Assembler) ProduceAtPositions(base grid.Position) []grid.Position
- func (c *Assembler) Resource() Resource
- func (c *Assembler) Size() grid.Size
- func (c *Assembler) Tick()
- type Consumer
- type Conveyor
- func (c *Conveyor) CanConsumeAny() bool
- func (c *Conveyor) CanConsumeFrom(res Resource, dir grid.Direction) bool
- func (c *Conveyor) CanProduce() bool
- func (c *Conveyor) ConsumeAtPositions(base grid.Position) []grid.Position
- func (c *Conveyor) ConsumeFrom(res Resource, dir grid.Direction)
- func (c *Conveyor) Dir() grid.Direction
- func (c *Conveyor) Info() []string
- func (c *Conveyor) Name() string
- func (c *Conveyor) Produce() (Resource, bool)
- func (c *Conveyor) ProduceAtPositions(base grid.Position) []grid.Position
- func (c *Conveyor) Resource() Resource
- func (c *Conveyor) Size() grid.Size
- func (c *Conveyor) Tick()
- type Finalizer
- func (c *Finalizer) CanConsumeAny() bool
- func (c *Finalizer) CanConsumeFrom(res Resource, dir grid.Direction) bool
- func (c *Finalizer) ConsumeAtPositions(base grid.Position) []grid.Position
- func (c *Finalizer) ConsumeFrom(res Resource, dir grid.Direction)
- func (c *Finalizer) Info() []string
- func (c *Finalizer) Name() string
- func (c *Finalizer) Resource() Resource
- func (c *Finalizer) Size() grid.Size
- func (c *Finalizer) Tick()
- type IncarnationProducer
- func (p *IncarnationProducer) CanProduce() bool
- func (p *IncarnationProducer) Info() []string
- func (p *IncarnationProducer) Name() string
- func (p *IncarnationProducer) Produce() (Resource, bool)
- func (p *IncarnationProducer) ProduceAtPositions(base grid.Position) []grid.Position
- func (p *IncarnationProducer) Resource() Resource
- func (p *IncarnationProducer) Size() grid.Size
- func (p *IncarnationProducer) Tick()
- type Object
- type Obstacle
- type ObstacleType
- type Producer
- type ProducerConsumer
- type Queue
- type Rate
- type Receipt
- type Resource
- type Stock
- type Trashbin
- func (c *Trashbin) CanConsumeAny() bool
- func (c *Trashbin) CanConsumeFrom(Resource, grid.Direction) bool
- func (c *Trashbin) ConsumeAtPositions(base grid.Position) []grid.Position
- func (c *Trashbin) ConsumeFrom(res Resource, dir grid.Direction)
- func (c *Trashbin) Info() []string
- func (c *Trashbin) Name() string
- func (c *Trashbin) Size() grid.Size
- func (c *Trashbin) Tick()
- type Universe
- func (u *Universe) AddObject(o Object, at grid.Position) error
- func (u *Universe) AllObjects() []*grid.Object[Object]
- func (u *Universe) ContainsPosition(p grid.Position) bool
- func (u *Universe) DeleteAt(p grid.Position)
- func (u *Universe) ObjectAt(p grid.Position) (*grid.Object[Object], bool)
- func (u *Universe) Size() grid.Size
- func (u *Universe) Tick()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Max ¶
func Max[T constraints.Ordered](a, b T) T
func Min ¶
func Min[T constraints.Ordered](a, b T) T
Types ¶
type Assembler ¶
type Assembler struct {
// contains filtered or unexported fields
}
func NewAssembler ¶
func (*Assembler) CanConsumeAny ¶
func (*Assembler) CanConsumeFrom ¶
func (*Assembler) CanProduce ¶
func (*Assembler) ConsumeAtPositions ¶
func (*Assembler) ProduceAtPositions ¶
type Conveyor ¶
type Conveyor struct {
// contains filtered or unexported fields
}
func (*Conveyor) CanConsumeAny ¶
func (*Conveyor) CanConsumeFrom ¶
func (*Conveyor) CanProduce ¶
func (*Conveyor) ConsumeAtPositions ¶
func (*Conveyor) ProduceAtPositions ¶
type Finalizer ¶
type Finalizer struct {
// contains filtered or unexported fields
}
func NewFinalizer ¶
func (*Finalizer) CanConsumeAny ¶
func (*Finalizer) CanConsumeFrom ¶
func (*Finalizer) ConsumeAtPositions ¶
type IncarnationProducer ¶
type IncarnationProducer struct {
// contains filtered or unexported fields
}
func NewIncarnationProducer ¶
func NewIncarnationProducer(name string, res Resource, rate Rate, stockCapa int) *IncarnationProducer
func (*IncarnationProducer) CanProduce ¶
func (p *IncarnationProducer) CanProduce() bool
func (*IncarnationProducer) Info ¶
func (p *IncarnationProducer) Info() []string
func (*IncarnationProducer) Name ¶
func (p *IncarnationProducer) Name() string
func (*IncarnationProducer) Produce ¶
func (p *IncarnationProducer) Produce() (Resource, bool)
func (*IncarnationProducer) ProduceAtPositions ¶
func (p *IncarnationProducer) ProduceAtPositions(base grid.Position) []grid.Position
func (*IncarnationProducer) Resource ¶
func (p *IncarnationProducer) Resource() Resource
func (*IncarnationProducer) Size ¶
func (p *IncarnationProducer) Size() grid.Size
func (*IncarnationProducer) Tick ¶
func (p *IncarnationProducer) Tick()
type Obstacle ¶
type Obstacle struct {
// contains filtered or unexported fields
}
func NewObstacle ¶
func NewObstacle(name string, typ ObstacleType) *Obstacle
func (*Obstacle) Type ¶
func (c *Obstacle) Type() ObstacleType
type ProducerConsumer ¶
type Receipt ¶
func AllReceipts ¶
func AllReceipts() []Receipt
func ReceiptFor ¶
func ReceiptIron ¶
func ReceiptIron() Receipt
func ReceiptSteel ¶
func ReceiptSteel() Receipt
type Stock ¶
type Stock struct {
// contains filtered or unexported fields
}
func (*Stock) TotalAmount ¶
type Trashbin ¶
type Trashbin struct {
// contains filtered or unexported fields
}
func NewTrashbin ¶
func (*Trashbin) CanConsumeAny ¶
func (*Trashbin) ConsumeAtPositions ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.