--- Begin Message ---
I have this code so solve a challenge of Advent Of Code :
process: anArray
    | op |
    ram := (anArray splitOn: ',') collect: [ :ea | ea asInteger ].
    in := ReadStream on: ram.
    [ (op := in next) = 99 ] whileFalse: [ self processOpcode: op ].
    ^ self at: 0
that works fine for the given tests
but on the real data I have to change 2 numbers
so I can do :
 
process: anArray
    | op |
    ram := (anArray splitOn: ',') collect: [ :ea | ea asInteger ].
    self  put: 2  at: 3. 
         in := ReadStream on: ram.
    [ (op := in next) = 99 ] whileFalse: [ self processOpcode: op ].
    ^ self at: 0
but that breaks all the tests
is there a way I can make it work for the tests and for the real data without breaking anything ?

so to be clear. In the test are data given which not has to be changed. As soon as you have to solve the real problem , some data needs to be changed.

Roelof




--- End Message ---

Reply via email to