Documentation
¶
Index ¶
- Constants
- type DebugMode
- type IntCode
- func (c *IntCode) Address(addr int) int
- func (c *IntCode) IntCodeToIntCodeProtocol(inputC chan int)
- func (c *IntCode) Read(offset int) int
- func (c *IntCode) ReadInput() int
- func (c *IntCode) Run() int
- func (c *IntCode) RunBackground()
- func (c *IntCode) SetAddress(addr, value int)
- func (c *IntCode) SetIf(offset int, cond bool)
- func (c *IntCode) SetValue(addr, value int)
- func (c *IntCode) String() string
- func (c *IntCode) Value(addr int) int
- func (c *IntCode) Write(offset, value int)
- func (c *IntCode) WriteOutput(out int)
- type ParameterMode
- type ReadWriter
Constants ¶
View Source
const ( DebugNone = DebugMode(iota) DebugInfo DebugVerbose )
View Source
const ( NOP = iota ADD MUL IN OUT NON_ZERO ZERO LT EQ REL EOF = 99 )
View Source
const ( ModePosition = ParameterMode(iota) ModeImmediate ModeRelative )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntCode ¶
type IntCode struct { Name string Memory map[int]int Cursor int IgnoreNonAddressedMemory bool DebugMode DebugMode Input ReadWriter Output ReadWriter OutputLinkedFromInput bool Done chan bool RelativeOffset int // contains filtered or unexported fields }
func (*IntCode) IntCodeToIntCodeProtocol ¶
func (*IntCode) SetAddress ¶
SetAddress sets the given value into the address addr.
func (*IntCode) WriteOutput ¶
type ParameterMode ¶
type ParameterMode int
type ReadWriter ¶
ReadeWriter chan (C) expects a request and a response.
Click to show internal directories.
Click to hide internal directories.