I kinda like this Run method on the receiver

This commit is contained in:
2022-06-07 22:54:57 -05:00
parent 092fe15b07
commit 2a8384949f
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ func ParseIntcodeProgram(programStr string) IntcodeProgram {
return program
}
func RunIntcodeProgram(program IntcodeProgram) {
func (program IntcodeProgram) Run() {
for instructionPointer := 0; instructionPointer < len(program); {
opcode := program[instructionPointer]
switch opcode {