Update Machine.scala
This commit is contained in:
parent
940411f4f6
commit
677cdbea37
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue