Update Machine.scala

This commit is contained in:
kamoshi 2019-12-11 07:45:22 +01:00 committed by GitHub
parent 940411f4f6
commit 677cdbea37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ class Machine(input: Array[Long])
// 99 -> Reached end of the program -> halt // 99 -> Reached end of the program -> halt
case (_, _, _, OpCode99) => case (_, _, _, OpCode99) =>
state = Finished state = Finished
println("Machine finished") //println("Machine finished")
this this
// 3 -> Trying to retrieve an input value from the buffer; in case of failure -> halt // 3 -> Trying to retrieve an input value from the buffer; in case of failure -> halt
@ -85,7 +85,7 @@ class Machine(input: Array[Long])
if (inputStream.isEmpty) if (inputStream.isEmpty)
{ {
state = Input state = Input
println("Ran out of inputs") //println("Ran out of inputs")
this this
} }
// buffer contains inputs // buffer contains inputs