Discover Packages
github.com/hamzah-hayat/adventofcode
intcode
package
Version:
v0.0.0-...-3cb827e
Opens a new window with list of versions in this module.
Published: Dec 16, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func RunIntCodeProgram(programInt []int , input chan int , output chan int , message chan Message )
RunIntCodeProgram runs an intcode program
func RunIntCodeProgramWaitForTermination(program []int , input chan int , output chan int , t chan bool , message chan Message )
RunIntCodeProgramWaitForTermination runs an intcode program then sends a true signal to the t channel
type Message struct {
MessageType int
}
Message is used to signal whether the intcode computer is waiting for input or waiting for output
We can use this to decide whether to send input or take output from the program
MessageTypes are 0 for input, 1 for output
Source Files
¶
Click to show internal directories.
Click to hide internal directories.