Update OpCode3.scala
This commit is contained in:
parent
46c5d40c49
commit
ce2a2d4805
|
@ -1,13 +1,15 @@
|
|||
package intcode.opcode
|
||||
|
||||
/** Input */
|
||||
case object OpCode3 extends Input
|
||||
/** Input
|
||||
* Takes a single integer as input and saves it to the position given by its only parameter.
|
||||
*/
|
||||
case object OpCode3 extends OpCode
|
||||
{
|
||||
/** length of an instruction */
|
||||
override val length: Int = 2
|
||||
|
||||
/** Executes instruction for given parameters and modes */
|
||||
override def input(tape: Array[Long], relative: Long, param1: Long, mode1: Int, input: Long): Unit =
|
||||
def input(tape: Array[Long], relative: Long, param1: Long, mode1: Int, input: Long): Unit =
|
||||
{
|
||||
writer(tape, relative, param1, mode1, input)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue