Documentation ¶
Index ¶
- Constants
- type Circuit
- type Simulation
- func (s *Simulation) Circuit() *Circuit
- func (s *Simulation) DiffDraw(previousSimulation *Simulation, img *image.Paletted)
- func (s *Simulation) Draw(img *image.Paletted)
- func (s *Simulation) DrawAll(initialImage *image.Paletted, frameCount int) []*image.Paletted
- func (s *Simulation) FindLooping() (*Simulation, int)
- func (s *Simulation) Hash() []byte
- func (s *Simulation) State(wire *Wire) WireState
- func (s *Simulation) Step() *Simulation
- type Transistor
- type Wire
- type WireState
Constants ¶
View Source
const MaxCharge = 6
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
func New ¶
func New(img *image.Paletted) *Simulation
func (*Simulation) Circuit ¶
func (s *Simulation) Circuit() *Circuit
func (*Simulation) DiffDraw ¶
func (s *Simulation) DiffDraw(previousSimulation *Simulation, img *image.Paletted)
func (*Simulation) Draw ¶
func (s *Simulation) Draw(img *image.Paletted)
func (*Simulation) FindLooping ¶
func (s *Simulation) FindLooping() (*Simulation, int)
func (*Simulation) Hash ¶
func (s *Simulation) Hash() []byte
func (*Simulation) State ¶
func (s *Simulation) State(wire *Wire) WireState
func (*Simulation) Step ¶
func (s *Simulation) Step() *Simulation
type Transistor ¶
type Transistor struct {
// contains filtered or unexported fields
}
func (*Transistor) Base ¶
func (t *Transistor) Base() *Wire
func (*Transistor) InputA ¶
func (t *Transistor) InputA() *Wire
func (*Transistor) InputB ¶
func (t *Transistor) InputB() *Wire
func (*Transistor) Position ¶
func (t *Transistor) Position() image.Point
type Wire ¶
type Wire struct {
// contains filtered or unexported fields
}
func (*Wire) IsPowerSource ¶
func (*Wire) Transistors ¶
func (w *Wire) Transistors() []*Transistor
Click to show internal directories.
Click to hide internal directories.