advent-of-code/2019/Scala/day07/intcode/opcode/OpCode4.scala

15 lines
338 B
Scala
Raw Normal View History

2019-12-07 18:49:02 +01:00
package day07.intcode.opcode
/** Output */
case object OpCode4 extends Output
{
/** length of an instruction */
override val length: Int = 2
/** Executes instruction for given parameters and modes */
override def output(tape: Array[Int], param1: Int, mode1: Int): Int =
{
accessor(param1, mode1, tape)
}
}